agent foundation
This commit is contained in:
@@ -17,6 +17,8 @@ class ScheduledJobService
|
||||
) {
|
||||
}
|
||||
|
||||
// Syncs the registry definitions to the DB on every request that needs job data —
|
||||
// new jobs are inserted automatically without a separate migration step.
|
||||
public function ensureSystemJobs(): void
|
||||
{
|
||||
$definitions = $this->scheduledJobRegistry->definitions();
|
||||
@@ -217,6 +219,7 @@ class ScheduledJobService
|
||||
{
|
||||
$type = $this->scheduleCalculator->normalizeScheduleType((string) ($existing['schedule_type'] ?? ($definition['default_schedule_type'] ?? 'daily')));
|
||||
$normalized = [
|
||||
// label and description always come from the registry — admin edits to those fields are not preserved.
|
||||
'label' => (string) ($definition['label'] ?? (string) ($existing['label'] ?? '')),
|
||||
'description' => (string) ($definition['description'] ?? (string) ($existing['description'] ?? '')),
|
||||
'enabled' => (int) ($existing['enabled'] ?? ($definition['default_enabled'] ?? 1)),
|
||||
|
||||
Reference in New Issue
Block a user