Gate WASM cron hooks behind plugin_allow_background_jobs

This commit is contained in:
Marco Allegretti 2026-03-05 13:25:51 +01:00
parent 7273532b30
commit dc6647efbf

View file

@ -334,7 +334,9 @@ async fn run() -> Result<(), StartupError> {
// WASM plugins need per-community context.
let community_ids: Vec<Uuid> =
match sqlx::query_scalar("SELECT id FROM communities WHERE is_active = true")
match sqlx::query_scalar(
"SELECT id FROM communities WHERE is_active = true AND settings->>'plugin_allow_background_jobs' = 'true'",
)
.fetch_all(&cron_pool)
.await
{