diff --git a/src/lib.rs b/src/lib.rs index 75992dcec..81d9d1af8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -207,10 +207,10 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> { rate_limit_cell.clone(), ); - let scheduled_tasks = (!args.disable_scheduled_tasks).then(|| { + if !args.disable_scheduled_tasks { // Schedules various cleanup tasks for the DB - tokio::task::spawn(scheduled_tasks::setup(context.clone())) - }); + let _scheduled_tasks = tokio::task::spawn(scheduled_tasks::setup(context.clone())); + } if let Some(prometheus) = SETTINGS.prometheus.clone() { serve_prometheus(prometheus, context.clone())?;