Skip to content

Commit c69daca

Browse files
committed
Add graceful handling for mutex errors
1 parent c59e0f3 commit c69daca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Commands/MigrateCommandExtension.php

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ public function handle(): int
2727
return $this->call(MutexMigrateCommand::class, $this->getCommandOptions());
2828
} catch (DatabaseCacheTableNotFoundException $e) {
2929
if ($this->option(MutexMigrateCommand::OPTION_MUTEX)) {
30+
if ($this->option('graceful')) {
31+
$this->components->warn($e->getMessage());
32+
33+
return self::SUCCESS;
34+
}
35+
3036
return self::FAILURE;
3137
} elseif ($this->option(MutexMigrateCommand::OPTION_MUTEX_GRACEFUL)) {
3238
$this->components->warn('Falling back to a standard migration');

0 commit comments

Comments
 (0)