From 219ce0ca2b006f24845bc8507769ae47f1034ccf Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 10 Sep 2026 23:39:31 +0930 Subject: [PATCH] Move account_storage_reconcile flag to config/scheduledtasks.php Introduce a dedicated config/scheduledtasks.php for scheduled-task toggles and relocate the reconciler flag there (ACCOUNT_STORAGE_RECONCILE), reading it via config() in routes/scheduledtasks.php. Removed the setting from config/pixelfed.php. Verified both states with schedule:list. --- config/pixelfed.php | 13 ------------- config/scheduledtasks.php | 24 ++++++++++++++++++++++++ routes/scheduledtasks.php | 5 ++++- 3 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 config/scheduledtasks.php diff --git a/config/pixelfed.php b/config/pixelfed.php index 9781babac..16ab0b3c2 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -69,19 +69,6 @@ return [ */ 'max_account_size' => env('MAX_ACCOUNT_SIZE', 1000000), - /* - |-------------------------------------------------------------------------- - | Account storage reconciler - |-------------------------------------------------------------------------- - | - | Optional weekly scheduled task that recalculates users.storage_used from - | actual media, correcting drift on accounts that never upload or delete. - | The upload/delete/read paths already self-heal stale counters, so this is - | a background hygiene job and is disabled by default. - | - */ - 'account_storage_reconcile' => env('ACCOUNT_STORAGE_RECONCILE', false), - /* |-------------------------------------------------------------------------- | Photo file size limit diff --git a/config/scheduledtasks.php b/config/scheduledtasks.php new file mode 100644 index 000000000..794a3418e --- /dev/null +++ b/config/scheduledtasks.php @@ -0,0 +1,24 @@ + env('ACCOUNT_STORAGE_RECONCILE', false), + +]; diff --git a/routes/scheduledtasks.php b/routes/scheduledtasks.php index 191460141..6d97a65bb 100644 --- a/routes/scheduledtasks.php +++ b/routes/scheduledtasks.php @@ -48,7 +48,10 @@ $schedule->command('app:notification-epoch-update')->weeklyOn(1, '2:21')->onOneS $schedule->command('app:hashtag-cached-count-update')->hourlyAt(25)->onOneServer(); $schedule->command('app:account-post-count-stat-update')->everySixHours(25)->onOneServer(); -if ((bool) config_cache('pixelfed.account_storage_reconcile')) { +if ((bool) config('scheduledtasks.account_storage_reconcile')) { + // Optional drift reconciler. The upload/delete/read paths already + // self-heal stale storage_used counters, so this is disabled by + // default and only needed to tidy accounts that never upload/delete. $schedule->command('user:storage:recalculate --stale=168')->weeklyOn(3, '3:30')->onOneServer()->withoutOverlapping(1440); }