change the order of update
This commit is contained in:
parent
71ff19e746
commit
b4119fe012
1 changed files with 9 additions and 8 deletions
|
|
@ -604,6 +604,15 @@ public function update_by_uuid(Request $request)
|
||||||
$database->update($databasePayload);
|
$database->update($databasePayload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($backupPayload && $backupConfig) {
|
||||||
|
$backupConfig->update($backupPayload);
|
||||||
|
|
||||||
|
if ($request->backup_now) {
|
||||||
|
dd('test');
|
||||||
|
DatabaseBackupJob::dispatch($backupConfig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($backupPayload && ! $backupConfig) {
|
if ($backupPayload && ! $backupConfig) {
|
||||||
if ($database->type() === 'standalone-postgresql') {
|
if ($database->type() === 'standalone-postgresql') {
|
||||||
$backupPayload['databases_to_backup'] = $database->postgres_db;
|
$backupPayload['databases_to_backup'] = $database->postgres_db;
|
||||||
|
|
@ -628,14 +637,6 @@ public function update_by_uuid(Request $request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($backupPayload && $backupConfig) {
|
|
||||||
$backupConfig->update($backupPayload);
|
|
||||||
|
|
||||||
if ($request->backup_now) {
|
|
||||||
DatabaseBackupJob::dispatch($backupConfig);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($whatToDoWithDatabaseProxy === 'start') {
|
if ($whatToDoWithDatabaseProxy === 'start') {
|
||||||
StartDatabaseProxy::dispatch($database);
|
StartDatabaseProxy::dispatch($database);
|
||||||
} elseif ($whatToDoWithDatabaseProxy === 'stop') {
|
} elseif ($whatToDoWithDatabaseProxy === 'stop') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue