fix(webhook): replace delete with forceDelete for application previews to ensure immediate removal
This commit is contained in:
parent
28d05f759e
commit
a10e51b2c4
1 changed files with 2 additions and 2 deletions
|
|
@ -240,7 +240,7 @@ public function manual(Request $request)
|
|||
if ($action === 'closed') {
|
||||
$found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first();
|
||||
if ($found) {
|
||||
$found->delete();
|
||||
$found->forceDelete();
|
||||
$container_name = generateApplicationContainerName($application, $pull_request_id);
|
||||
instant_remote_process(["docker rm -f $container_name"], $application->destination->server);
|
||||
$return_payloads->push([
|
||||
|
|
@ -480,7 +480,7 @@ public function normal(Request $request)
|
|||
}
|
||||
|
||||
ApplicationPullRequestUpdateJob::dispatchSync(application: $application, preview: $found, status: ProcessStatus::CLOSED);
|
||||
$found->delete();
|
||||
$found->forceDelete();
|
||||
|
||||
$return_payloads->push([
|
||||
'application' => $application->name,
|
||||
|
|
|
|||
Loading…
Reference in a new issue