refactor scheduled task job (and related stuffs)

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

No files matched your search

+10
View File
@@ -24,6 +24,16 @@ class ServiceDatabase extends BaseModel
});
}
public static function ownedByCurrentTeamAPI(int $teamId)
{
return ServiceDatabase::whereRelation('service.environment.project.team', 'id', $teamId)->orderBy('name');
}
public static function ownedByCurrentTeam()
{
return ServiceDatabase::whereRelation('service.environment.project.team', 'id', currentTeam()->id)->orderBy('name');
}
public function restart()
{
$container_id = $this->name.'-'.$this->service->uuid;