Skip to content

Commit

Permalink
Merge pull request #10 from open-runtimes/fix-maintenance-task
Browse files Browse the repository at this point in the history
fix: delete active runtimes from the swoole table on failure
  • Loading branch information
christyjacob4 authored Nov 10, 2022
2 parents c2cac12 + 7e80e2d commit 8d3da33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -921,11 +921,11 @@ function (string $runtimeId, string $payload, array $variables, int $timeout, st
$connection = $orchestrationPool->pop();
$orchestration = $connection->getResource();
$orchestration->remove($runtime['name'], true);
$activeRuntimes->del($activeRuntimeId);
Console::success("Successfully removed {$runtime['name']}");
} catch (\Throwable $th) {
Console::error('Inactive Runtime deletion failed: ' . $th->getMessage());
} finally {
isset($connection) && $activeRuntimes->del($activeRuntimeId);
isset($connection) && $connection->reclaim();
}
});
Expand Down

0 comments on commit 8d3da33

Please sign in to comment.