This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- impl GracefulShutdown service which listens to OS signals and shutdowns each component gracefully - impl graceful shutdown for Room and HTTP server - add [shutdown] config section Additionally: - provide explicit states for Room
- Loading branch information
Showing
11 changed files
with
518 additions
and
120 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//! Application shutdown settings. | ||
use std::time::Duration; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use smart_default::SmartDefault; | ||
|
||
/// Application shutdown settings. | ||
#[derive(Clone, Debug, Deserialize, Serialize, SmartDefault)] | ||
#[serde(default)] | ||
pub struct Shutdown { | ||
/// Maximum duration given to shutdown the whole application gracefully. | ||
#[default(Duration::from_secs(5))] | ||
#[serde(with = "serde_humantime")] | ||
pub timeout: Duration, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.