1
0

instances added god may help

This commit is contained in:
2026-02-23 12:58:19 +01:00
parent 25370a1a55
commit 99db252f60
290 changed files with 9858 additions and 4914 deletions

View File

@@ -6,7 +6,7 @@ use MintyPHP\DB;
class SchedulerRuntimeRepository
{
public static function touchHeartbeat(string $result, ?string $errorCode = null, ?string $heartbeatAtUtc = null): bool
public function touchHeartbeat(string $result, ?string $errorCode = null, ?string $heartbeatAtUtc = null): bool
{
$heartbeatAtUtc = trim((string) ($heartbeatAtUtc ?? ''));
if ($heartbeatAtUtc === '') {
@@ -17,7 +17,7 @@ class SchedulerRuntimeRepository
if ($result === '') {
$result = 'ok';
}
$errorCode = self::nullableTrim($errorCode);
$errorCode = $this->nullableTrim($errorCode);
$updated = DB::update(
'insert into scheduler_runtime_status (id, last_heartbeat_at, last_result, last_error_code) ' .
@@ -34,7 +34,7 @@ class SchedulerRuntimeRepository
return $updated !== false;
}
public static function findStatus(): ?array
public function findStatus(): ?array
{
$row = DB::selectOne('select * from scheduler_runtime_status where id = 1 limit 1');
if (!is_array($row)) {
@@ -44,7 +44,7 @@ class SchedulerRuntimeRepository
return is_array($item) ? $item : null;
}
private static function nullableTrim(?string $value): ?string
private function nullableTrim(?string $value): ?string
{
$value = trim((string) $value);
return $value !== '' ? $value : null;