Skip to content

Commit 9d2c046

Browse files
fix: ensure maintenance mode is started and stopped during update process
1 parent 7f2d4c3 commit 9d2c046

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/Console/Commands/Update.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function handle()
2828
{
2929
$error = false;
3030
try {
31+
$this->call('maintenance', ['start']);
3132
$process = new Process(['git', 'pull', 'origin', 'main']);
3233
$process->run();
3334
if (! $process->isSuccessful()) {
@@ -50,6 +51,7 @@ public function handle()
5051
}
5152
} finally {
5253
$error ? $this->error('Update Gagal!') : $this->info('Update Sukses! ');
54+
$this->call('maintenance', ['stop']);
5355
}
5456
}
5557
}

0 commit comments

Comments
 (0)