mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
On cloud, StartService and DeployServiceApplication dispatched their CoolifyTask on the high queue, so service starts competed with all other high jobs. remote_process() and CoolifyTask now accept a queue (default high); start paths pass deployment_queue(). The queued RestartDatabase action also runs on deployment_queue() instead of the default queue.
20 lines
616 B
PHP
20 lines
616 B
PHP
<?php
|
|
|
|
namespace App\Traits;
|
|
|
|
use App\Services\DatabaseStartCommandExecutor;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Spatie\Activitylog\Models\Activity;
|
|
|
|
trait ExecutesDatabaseStartCommands
|
|
{
|
|
private function executeDatabaseStartCommands(array $commands, Model $database, ?Activity $activity = null): Activity
|
|
{
|
|
if ($activity) {
|
|
return app(DatabaseStartCommandExecutor::class)->execute($commands, $database, $activity);
|
|
}
|
|
|
|
return remote_process($commands, $database->destination->server, callEventOnFinish: 'DatabaseStatusChanged', queue: deployment_queue());
|
|
}
|
|
}
|