Update app/Livewire/Project/Service/Heading.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Andras Bacsai 2025-05-20 11:15:07 +02:00 committed by GitHub
parent 9651195318
commit 2424bd408b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,11 @@ public function start()
public function forceDeploy()
{
try {
$activities = Activity::where('properties->type_uuid', $this->service->uuid)->where('properties->status', ProcessStatus::IN_PROGRESS->value)->orWhere('properties->status', ProcessStatus::QUEUED->value)->get();
$activities = Activity::where('properties->type_uuid', $this->service->uuid)
->where(function ($q) {
$q->where('properties->status', ProcessStatus::IN_PROGRESS->value)
->orWhere('properties->status', ProcessStatus::QUEUED->value);
})->get();
foreach ($activities as $activity) {
$activity->properties->status = ProcessStatus::ERROR->value;
$activity->save();