fedi-feed-router/routes/console.php

43 lines
1.1 KiB
PHP

<?php
use App\Jobs\ArticleDiscoveryJob;
use App\Jobs\CheckFeedStalenessJob;
use App\Jobs\CleanupActivityLogsJob;
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();
Schedule::job(new CleanupActivityLogsJob)
->daily()
->name('cleanup-activity-logs')
->withoutOverlapping()
->onOneServer();