Skip to content

Commit 60547b9

Browse files
committed
Service framework background tasks and watchdogs (#39)
* Service framework background task - Implement an optional background task for services that starts automatically on service start. - Implement a watchdog that updates the service's status when its task fails at runtime * WIP: Partially implemented - Background task startup + watchdog implemented for service startup - Implementation for service shutdown missing - Handling of watchdog triggers of essential tasks missing * Refactor of service framework Split service framework into multiple submodules * Implement Watchdog module * Optimize Watchdog module Make usage of Watchdog more flexible * Refactor start_service Refactor the giant block of cod e into smaller helper methods where possible * Edit StartupError string representations * Finish refactor of start_service method * Refactor stop_service - Apply same refactoring to stop_service - Increase name placeholder space to 30 in logger
1 parent 0341bcc commit 60547b9

File tree

8 files changed

+757
-538
lines changed

8 files changed

+757
-538
lines changed

rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
max_width = 110

src/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn setup() -> Result<(), SetLoggerError> {
2525
fern::Dispatch::new()
2626
.format(move |out, message, record| {
2727
out.finish(format_args!(
28-
"[{} {: <25} {: <5}] {}",
28+
"[{} {: <30} {: <5}] {}",
2929
humantime::format_rfc3339_seconds(SystemTime::now()),
3030
record.target(),
3131
colors.color(record.level()),

0 commit comments

Comments
 (0)