Skip to content

Commit 9061907

Browse files
committed
job dispatching: add ->withoutOverlapping() where useful (#916)
1 parent 11cfb64 commit 9061907

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

app/Console/Kernel.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,29 @@ protected function schedule(Schedule $schedule): void
3333
// This will create at most 1 new entry for each per minute...
3434
// There are also jobs currently scheduled in Controllers that use up resources from these pools
3535
// for more opportunistic storage repopulation
36-
$schedule->job(new ProvisionWikiDbJob(null, null, 10))->everyMinute();
37-
$schedule->job(new ProvisionQueryserviceNamespaceJob(null, 10))->everyMinute();
36+
$schedule->job(new ProvisionWikiDbJob(null, null, 10))->everyMinute()->withoutOverlapping();
37+
$schedule->job(new ProvisionQueryserviceNamespaceJob(null, 10))->everyMinute()->withoutOverlapping();
3838

3939
// Slowly cleanup some tables
40-
$schedule->job(new ExpireOldUserVerificationTokensJob)->hourly();
41-
$schedule->job(new PruneEventPageUpdatesTable)->everyFifteenMinutes();
42-
$schedule->job(new PruneQueryserviceBatchesTable)->everyFifteenMinutes();
43-
$schedule->job(new CreateQueryserviceBatchesJob)->everyMinute();
44-
$schedule->job(new RequeuePendingQsBatchesJob)->everyFifteenMinutes();
40+
$schedule->job(new ExpireOldUserVerificationTokensJob)->hourly()->withoutOverlapping();
41+
$schedule->job(new PruneEventPageUpdatesTable)->everyFifteenMinutes()->withoutOverlapping();
42+
$schedule->job(new PruneQueryserviceBatchesTable)->everyFifteenMinutes()->withoutOverlapping();
43+
$schedule->job(new CreateQueryserviceBatchesJob)->everyMinute()->withoutOverlapping();
44+
$schedule->job(new RequeuePendingQsBatchesJob)->everyFifteenMinutes()->withoutOverlapping();
4545
$schedule->job(new FailStalledEntityImportsJob)->hourly();
4646

4747
// Sandbox
4848
// TODO this should maybe only be run when sandbox as a whole is loaded?
4949
// TODO instead of using LOAD ROUTES, we should just have different modes?
50-
$schedule->job(new SandboxCleanupJob)->everyFifteenMinutes();
50+
$schedule->job(new SandboxCleanupJob)->everyFifteenMinutes()->withoutOverlapping();
5151

5252
// Schedule site stat updates for each wiki and platform-summary
5353
$schedule->command('schedule:stats')->dailyAt('7:00');
5454

5555
// https://laravel.com/docs/10.x/upgrade#redis-cache-tags
56-
$schedule->command('cache:prune-stale-tags')->hourly();
56+
$schedule->command('cache:prune-stale-tags')->hourly()->withoutOverlapping();
5757

58-
$schedule->job(new PollForMediaWikiJobsJob)->everyFifteenMinutes();
58+
$schedule->job(new PollForMediaWikiJobsJob)->everyFifteenMinutes()->withoutOverlapping();
5959

6060
$schedule->job(new UpdateWikiSiteStatsJob)->dailyAt('19:00');
6161

0 commit comments

Comments
 (0)