feat: add high priority queue
This commit is contained in:
parent
93c890ce41
commit
fcb3d71cb4
@ -340,7 +340,7 @@ private function decide_what_to_do()
|
||||
private function post_deployment()
|
||||
{
|
||||
if ($this->server->isProxyShouldRun()) {
|
||||
GetContainersStatus::dispatch($this->server);
|
||||
GetContainersStatus::dispatch($this->server)->onQueue('high');
|
||||
// dispatch(new ContainerStatusJob($this->server));
|
||||
}
|
||||
$this->next(ApplicationDeploymentStatus::FINISHED->value);
|
||||
|
@ -23,7 +23,8 @@ public function __construct(
|
||||
public bool $ignore_errors = false,
|
||||
public $call_event_on_finish = null,
|
||||
public $call_event_data = null
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
|
@ -45,7 +45,7 @@ public function mount()
|
||||
public function check_status($showNotification = false)
|
||||
{
|
||||
if ($this->application->destination->server->isFunctional()) {
|
||||
GetContainersStatus::dispatch($this->application->destination->server);
|
||||
GetContainersStatus::dispatch($this->application->destination->server)->onQueue('high');
|
||||
// dispatch(new ContainerStatusJob($this->application->destination->server));
|
||||
} else {
|
||||
dispatch(new ServerStatusJob($this->application->destination->server));
|
||||
|
@ -186,7 +186,7 @@ public function stop(int $pull_request_id)
|
||||
instant_remote_process(["docker rm -f $name"], $this->application->destination->server, throwError: false);
|
||||
}
|
||||
}
|
||||
GetContainersStatus::dispatchSync($this->application->destination->server);
|
||||
GetContainersStatus::dispatchSync($this->application->destination->server)->onQueue('high');
|
||||
$this->dispatch('reloadWindow');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
|
@ -24,7 +24,7 @@ public function __construct(public Server $server)
|
||||
if ($this->server->unreachable_notification_sent === false) {
|
||||
return;
|
||||
}
|
||||
GetContainersStatus::dispatch($server);
|
||||
GetContainersStatus::dispatch($server)->onQueue('high');
|
||||
// dispatch(new ContainerStatusJob($server));
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@
|
||||
'defaults' => [
|
||||
's6' => [
|
||||
'connection' => 'redis',
|
||||
'queue' => ['default'],
|
||||
'queue' => ['high', 'default'],
|
||||
'balance' => env('HORIZON_BALANCE', 'auto'),
|
||||
'maxTime' => 0,
|
||||
'maxJobs' => 0,
|
||||
|
Loading…
Reference in New Issue
Block a user