Added mechanism to skip updates in a module
* This is useful in modules where HTTP API calls are made. Updating them every second is expensive, network intensive and can cause rate limits to be hit * Added get_name() function to modules for easier debug statements
This commit is contained in:
@@ -18,6 +18,12 @@ impl fmt::Display for TemperatureUnits {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug,PartialEq,Eq,Copy,Clone)]
|
||||
pub enum UpdateResult {
|
||||
Update,
|
||||
Skip
|
||||
}
|
||||
|
||||
// --------------------
|
||||
// Application options
|
||||
// --------------------
|
||||
@@ -29,4 +35,5 @@ pub struct AppOptions {
|
||||
pub music_progress: bool,
|
||||
pub debug: bool,
|
||||
pub debug_modules: bool,
|
||||
pub debug_update: bool,
|
||||
}
|
||||
|
Reference in New Issue
Block a user