revert delayed jobs for now
This commit is contained in:
parent
9642453052
commit
f6b886adbc
@ -68,35 +68,35 @@ private function check_resources($schedule)
|
|||||||
$containerServers = $servers->where('settings.is_swarm_worker', false)->where('settings.is_build_server', false);
|
$containerServers = $servers->where('settings.is_swarm_worker', false)->where('settings.is_build_server', false);
|
||||||
}
|
}
|
||||||
foreach ($containerServers as $server) {
|
foreach ($containerServers as $server) {
|
||||||
// $schedule->job(new ContainerStatusJob($server))->everyMinute()->onOneServer();
|
$schedule->job(new ContainerStatusJob($server))->everyMinute()->onOneServer();
|
||||||
$schedule
|
// $schedule
|
||||||
->call(function () use ($server) {
|
// ->call(function () use ($server) {
|
||||||
$randomSeconds = rand(1, 40);
|
// $randomSeconds = rand(1, 40);
|
||||||
$job = new ContainerStatusJob($server);
|
// $job = new ContainerStatusJob($server);
|
||||||
$job->delay($randomSeconds);
|
// $job->delay($randomSeconds);
|
||||||
ray('dispatching container status job in ' . $randomSeconds . ' seconds');
|
// ray('dispatching container status job in ' . $randomSeconds . ' seconds');
|
||||||
dispatch($job);
|
// dispatch($job);
|
||||||
})->name('container-status-' . $server->id)->everyMinute()->onOneServer();
|
// })->name('container-status-' . $server->id)->everyMinute()->onOneServer();
|
||||||
if ($server->isLogDrainEnabled()) {
|
if ($server->isLogDrainEnabled()) {
|
||||||
// $schedule->job(new CheckLogDrainContainerJob($server))->everyMinute()->onOneServer();
|
$schedule->job(new CheckLogDrainContainerJob($server))->everyMinute()->onOneServer();
|
||||||
$schedule
|
// $schedule
|
||||||
->call(function () use ($server) {
|
// ->call(function () use ($server) {
|
||||||
$randomSeconds = rand(1, 40);
|
// $randomSeconds = rand(1, 40);
|
||||||
$job = new CheckLogDrainContainerJob($server);
|
// $job = new CheckLogDrainContainerJob($server);
|
||||||
$job->delay($randomSeconds);
|
// $job->delay($randomSeconds);
|
||||||
dispatch($job);
|
// dispatch($job);
|
||||||
})->name('log-drain-container-check-' . $server->id)->everyMinute()->onOneServer();
|
// })->name('log-drain-container-check-' . $server->id)->everyMinute()->onOneServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach ($servers as $server) {
|
foreach ($servers as $server) {
|
||||||
// $schedule->job(new ServerStatusJob($server))->everyMinute()->onOneServer();
|
$schedule->job(new ServerStatusJob($server))->everyMinute()->onOneServer();
|
||||||
$schedule
|
// $schedule
|
||||||
->call(function () use ($server) {
|
// ->call(function () use ($server) {
|
||||||
$randomSeconds = rand(1, 40);
|
// $randomSeconds = rand(1, 40);
|
||||||
$job = new ServerStatusJob($server);
|
// $job = new ServerStatusJob($server);
|
||||||
$job->delay($randomSeconds);
|
// $job->delay($randomSeconds);
|
||||||
dispatch($job);
|
// dispatch($job);
|
||||||
})->name('server-status-job-' . $server->id)->everyMinute()->onOneServer();
|
// })->name('server-status-job-' . $server->id)->everyMinute()->onOneServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private function instance_auto_update($schedule)
|
private function instance_auto_update($schedule)
|
||||||
|
Loading…
Reference in New Issue
Block a user