add logic

This commit is contained in:
ayntk-ai
2024-08-16 16:01:41 +02:00
parent d906bb2381
commit dab5f0fe09
4 changed files with 97 additions and 44 deletions

View File

@@ -49,7 +49,16 @@ class ScheduledTaskJob implements ShouldQueue
throw new \RuntimeException('ScheduledTaskJob failed: No resource found.');
}
$this->team = Team::find($task->team_id);
$this->server_timezone = $this->resource->destination->server->settings->server_timezone;
$this->server_timezone = $this->getServerTimezone();
}
private function getServerTimezone(): string
{
if ($this->resource instanceof Application) {
return $this->resource->destination->server->settings->server_timezone;
} elseif ($this->resource instanceof Service) {
return $this->resource->server->settings->server_timezone;
}
}
public function middleware(): array