fedi-feed-router/routes/console.php
myrmidex cc94ba8e55
Some checks failed
CI / ci (push) Failing after 4m35s
CI / ci (pull_request) Failing after 4m23s
89 - Add article cleanup job with 30-day retention policy
2026-03-18 18:09:54 +01:00

36 lines
937 B
PHP

<?php
use App\Jobs\ArticleDiscoveryJob;
use App\Jobs\CheckFeedStalenessJob;
use App\Jobs\CleanupArticlesJob;
use App\Jobs\PublishNextArticleJob;
use App\Jobs\SyncChannelPostsJob;
use Illuminate\Support\Facades\Schedule;
Schedule::call(function () {
SyncChannelPostsJob::dispatchForAllActiveChannels();
})->everyTenMinutes()->name('sync-lemmy-channel-posts');
Schedule::job(new PublishNextArticleJob)
->everyFiveMinutes()
->name('publish-next-article')
->withoutOverlapping()
->onOneServer();
Schedule::job(new ArticleDiscoveryJob)
->everyThirtyMinutes()
->name('refresh-articles')
->withoutOverlapping()
->onOneServer();
Schedule::job(new CheckFeedStalenessJob)
->hourly()
->name('check-feed-staleness')
->withoutOverlapping()
->onOneServer();
Schedule::job(new CleanupArticlesJob)
->daily()
->name('cleanup-old-articles')
->withoutOverlapping()
->onOneServer();