major update

This commit is contained in:
2026-03-04 15:56:58 +01:00
parent 16759a2732
commit 8f4dd5840d
478 changed files with 24313 additions and 8201 deletions

View File

@@ -2,6 +2,8 @@
namespace MintyPHP\Repository\Scheduler;
use MintyPHP\Domain\Taxonomy\ScheduledJobRunStatus;
use MintyPHP\Domain\Taxonomy\ScheduledJobTriggerType;
use MintyPHP\DB;
use MintyPHP\Repository\Support\RepoQuery;
@@ -17,8 +19,8 @@ class ScheduledJobRunRepository
(string) ($data['run_uuid'] ?? ''),
(string) ((int) ($data['job_id'] ?? 0)),
(string) ($data['job_key'] ?? ''),
(string) ($data['trigger_type'] ?? 'scheduler'),
(string) ($data['status'] ?? 'failed'),
(string) ($data['trigger_type'] ?? ScheduledJobTriggerType::Scheduler->value),
(string) ($data['status'] ?? ScheduledJobRunStatus::Failed->value),
($data['actor_user_id'] ?? null) !== null ? (string) ((int) $data['actor_user_id']) : null,
(string) ($data['started_at'] ?? ''),
$data['finished_at'] ?? null,
@@ -56,11 +58,11 @@ class ScheduledJobRunRepository
['scheduled_job_runs.run_uuid', 'scheduled_job_runs.error_code', 'scheduled_job_runs.error_message'],
$search
);
if (in_array($status, ['success', 'failed', 'skipped'], true)) {
if (ScheduledJobRunStatus::tryNormalize($status) !== null) {
$where[] = 'scheduled_job_runs.status = ?';
$params[] = $status;
}
if (in_array($triggerType, ['scheduler', 'manual'], true)) {
if (ScheduledJobTriggerType::tryNormalize($triggerType) !== null) {
$where[] = 'scheduled_job_runs.trigger_type = ?';
$params[] = $triggerType;
}