summaryrefslogtreecommitdiff
path: root/crates/bot-jobs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/bot-jobs/src/lib.rs')
-rw-r--r--crates/bot-jobs/src/lib.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/crates/bot-jobs/src/lib.rs b/crates/bot-jobs/src/lib.rs
deleted file mode 100644
index d65c929..0000000
--- a/crates/bot-jobs/src/lib.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use bot_config::Config;
-use bot_error::Error;
-
-use std::time::Duration;
-
-use log::error;
-
-mod repo;
-
-/// Run our jobs an initial time, then loop them on a separate thread
-///
-/// # Errors
-///
-/// Will return [`Err`] if any jobs fail
-pub fn dispatch(config: Config) -> Result<(), Error> {
- repo::fetch_or_update_repository(&config.nixpkgs_path, &config.nixpkgs_branches)?;
-
- tokio::spawn(async move {
- loop {
- tokio::time::sleep(Duration::from_secs(repo::TTL_SECS)).await;
- if let Err(why) =
- repo::fetch_or_update_repository(&config.nixpkgs_path, &config.nixpkgs_branches)
- {
- error!("Failed to fetch or update repository!\n{why:?}");
- };
- }
- });
-
- Ok(())
-}