refactor scheduled task job (and related stuffs)

This commit is contained in:
Andras Bacsai
2024-11-07 11:09:38 +01:00
parent 8e3469bdff
commit 376a2341af
9 changed files with 220 additions and 87 deletions

View File

@@ -37,6 +37,11 @@ class ServiceApplication extends BaseModel
return ServiceApplication::whereRelation('service.environment.project.team', 'id', $teamId)->orderBy('name');
}
public static function ownedByCurrentTeam()
{
return ServiceApplication::whereRelation('service.environment.project.team', 'id', currentTeam()->id)->orderBy('name');
}
public function isRunning()
{
return str($this->status)->contains('running');