We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50f31c2 commit f1e9b30Copy full SHA for f1e9b30
src/server/cronjobs.rs
@@ -7,13 +7,14 @@ use std::thread;
7
use std::time::Duration;
8
9
const DAY: Duration = Duration::from_secs(60 * 60 * 24);
10
+// The tuple is composed of:
11
+// - job name
12
+// - interval between executions
13
+// - function to execute at specified intervals
14
+type JobDescription = (&'static str, Duration, fn(Arc<Data>) -> Fallible<()>);
15
16
lazy_static! {
- // The tuple is composed of:
- // - job name
- // - interval between executions
- // - function to execute at specified intervals
- static ref JOBS: Vec<(&'static str, Duration, fn(Arc<Data>) -> Fallible<()>)> = {
17
+ static ref JOBS: Vec<JobDescription> = {
18
let mut jobs = Vec::new();
19
jobs.push((
20
"crate list update",
0 commit comments