From 979df6e39e4ead7349a24600113d4209468f7b04 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 30 Aug 2026 01:22:30 +0930 Subject: [PATCH] feat: migrate all local emoji to cloud in one pass by default Change --limit default to 0 (no limit) so the emoji migration processes every local emoji in a single run instead of capping at 1000, and drop the limit from the scheduled invocation. Avoids a multi-run window where not-yet-migrated emoji resolve to missing cloud URLs. --- app/Console/Commands/Admin/EmojiMoveStorageLocalToCloud.php | 4 ++-- bootstrap/app.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/Admin/EmojiMoveStorageLocalToCloud.php b/app/Console/Commands/Admin/EmojiMoveStorageLocalToCloud.php index b22159ac7..22e53a933 100644 --- a/app/Console/Commands/Admin/EmojiMoveStorageLocalToCloud.php +++ b/app/Console/Commands/Admin/EmojiMoveStorageLocalToCloud.php @@ -20,7 +20,7 @@ class EmojiMoveStorageLocalToCloud extends Command * @var string */ protected $signature = 'admin:EmojiMoveStorageLocalToCloud - {--limit=1000 : Max emoji rows to process this run} + {--limit=0 : Max emoji rows to process this run (0 = no limit, process all)} {--dry-run : Report what would happen without copying or writing} {--keep-local : Do not delete local files after verifying the cloud copy} {--force : Skip confirmation prompts}'; @@ -76,7 +76,7 @@ class EmojiMoveStorageLocalToCloud extends Command $query = CustomEmoji::whereNull('uri') ->whereNotNull('media_path') ->orderByDesc('id') - ->limit($limit); + ->when($limit > 0, fn ($q) => $q->limit($limit)); $bar = $this->output->createProgressBar($query->count()); $bar->start(); diff --git a/bootstrap/app.php b/bootstrap/app.php index cfc71ba4c..08965c52c 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -146,8 +146,8 @@ return Application::configure(basePath: dirname(__DIR__)) if ((bool) config_cache('pixelfed.cloud_storage') && (bool) config_cache('media.delete_local_after_cloud')) { // Upload any local stragglers to cloud and GC verified local copies. $schedule->command('admin:MediaMoveStorageLocalToCloud --force --limit=500')->hourlyAt(15); - // Same for local custom emoji. - $schedule->command('admin:EmojiMoveStorageLocalToCloud --force --limit=1000')->dailyAt('04:35'); + // Same for local custom emoji (no limit: keep all emoji on cloud). + $schedule->command('admin:EmojiMoveStorageLocalToCloud --force')->dailyAt('04:35'); } if (config('import.instagram.enabled')) {