fix(database-import): stop the restore when the import task fails or loses SSH

An import task can now run until the SSH command timeout (capped below the
Horizon worker timeout). When the CoolifyTask fails, times out, or its SSH
command ends with 124/255, Coolify stops the restore in the database
container and keeps the import in progress until the stop has run, so the
database stays blocked. The restore reports its own 124/255 as 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-10-02 16:00:29 +02:00
co-authored by Claude Opus 5.5
parent 332a970b27
commit 1ee34a5ab2
7 changed files with 380 additions and 2 deletions
+2
View File
@@ -28,6 +28,7 @@ function remote_process(
$callEventOnFinish = null,
$callEventData = null,
array $properties = [],
?int $timeout = null,
): Activity {
$type = $type ?? ActivityTypes::INLINE->value;
$command = $command instanceof Collection ? $command->toArray() : $command;
@@ -72,6 +73,7 @@ function remote_process(
ignore_errors: $ignore_errors,
call_event_on_finish: $callEventOnFinish,
call_event_data: $callEventData,
timeout: $timeout,
));
$activity->refresh();