chore: use the new job dispatch
This commit is contained in:
parent
76f13125ff
commit
43dacd83c9
2 changed files with 26 additions and 18 deletions
|
|
@ -218,14 +218,15 @@ public function clone(string $type)
|
|||
StopApplication::dispatch($application, false, false);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $application->destination->server;
|
||||
$sourceServer = $application->destination->server;
|
||||
$targetServer = $newApplication->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
queue_application_deployment(
|
||||
deployment_uuid: (string) new Cuid2,
|
||||
application: $application,
|
||||
server: $server,
|
||||
server: $sourceServer,
|
||||
destination: $application->destination,
|
||||
no_questions_asked: true
|
||||
);
|
||||
|
|
@ -325,9 +326,10 @@ public function clone(string $type)
|
|||
StopDatabase::dispatch($database);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $database->destination->server;
|
||||
$sourceServer = $database->destination->server;
|
||||
$targetServer = $newDatabase->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
StartDatabase::dispatch($database);
|
||||
} catch (\Exception $e) {
|
||||
|
|
@ -452,9 +454,10 @@ public function clone(string $type)
|
|||
StopService::dispatch($application, false, false);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $application->service->destination->server;
|
||||
$sourceServer = $application->service->destination->server;
|
||||
$targetServer = $newService->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
StartService::dispatch($application);
|
||||
} catch (\Exception $e) {
|
||||
|
|
@ -505,9 +508,10 @@ public function clone(string $type)
|
|||
StopService::dispatch($database->service, false, false);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $database->service->destination->server;
|
||||
$sourceServer = $database->service->destination->server;
|
||||
$targetServer = $newService->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
StartService::dispatch($database->service);
|
||||
} catch (\Exception $e) {
|
||||
|
|
|
|||
|
|
@ -153,14 +153,15 @@ public function cloneTo($destination_id)
|
|||
StopApplication::dispatch($this->resource, false, false);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $this->resource->destination->server;
|
||||
$sourceServer = $this->resource->destination->server;
|
||||
$targetServer = $new_resource->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
queue_application_deployment(
|
||||
deployment_uuid: (string) new Cuid2,
|
||||
application: $this->resource,
|
||||
server: $server,
|
||||
server: $sourceServer,
|
||||
destination: $this->resource->destination,
|
||||
no_questions_asked: true
|
||||
);
|
||||
|
|
@ -276,9 +277,10 @@ public function cloneTo($destination_id)
|
|||
StopDatabase::dispatch($this->resource);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $this->resource->destination->server;
|
||||
$sourceServer = $this->resource->destination->server;
|
||||
$targetServer = $new_resource->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
StartDatabase::dispatch($this->resource);
|
||||
} catch (\Exception $e) {
|
||||
|
|
@ -413,9 +415,10 @@ public function cloneTo($destination_id)
|
|||
StopService::dispatch($application, false, false);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $application->service->destination->server;
|
||||
$sourceServer = $application->service->destination->server;
|
||||
$targetServer = $new_resource->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
StartService::dispatch($application);
|
||||
} catch (\Exception $e) {
|
||||
|
|
@ -454,9 +457,10 @@ public function cloneTo($destination_id)
|
|||
StopService::dispatch($database->service, false, false);
|
||||
$sourceVolume = $volume->name;
|
||||
$targetVolume = $newPersistentVolume->name;
|
||||
$server = $database->service->destination->server;
|
||||
$sourceServer = $database->service->destination->server;
|
||||
$targetServer = $new_resource->destination->server;
|
||||
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $server, $newPersistentVolume);
|
||||
VolumeCloneJob::dispatch($sourceVolume, $targetVolume, $sourceServer, $targetServer, $newPersistentVolume);
|
||||
|
||||
StartService::dispatch($database->service);
|
||||
} catch (\Exception $e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue