From ab1bcaebc04d28f9d1925bd458a6bfd248d171cf Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 2 Feb 2025 02:28:09 +0000 Subject: [PATCH] Added missing housekeeping cronjob. --- VERSION | 2 +- tools/cron | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 50ae9039..ad51826f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -20250201 +20250202 diff --git a/tools/cron b/tools/cron index 5919cdb1..171fa38f 100755 --- a/tools/cron +++ b/tools/cron @@ -81,6 +81,12 @@ msz_sched_task_func('Recount forum topics and posts.', true, function() use ($ms msz_sched_task_sql('Clean up expired 2fa tokens.', false, 'DELETE FROM msz_auth_tfa WHERE tfa_created < NOW() - INTERVAL 15 MINUTE'); +msz_sched_task_func('Clean up OAuth2 related data.', false, function() use ($msz) { + $msz->oauth2Ctx->pruneExpired(function(string $format, ...$args) { + echo sprintf($format, ...$args) . PHP_EOL; + }); +}); + // very heavy stuff that should msz_sched_task_func('Resync statistics counters.', true, function() use ($msz) {