<?php

use App\ScheduledTasks\Actions\RunExportMapAction;
use App\ScheduledTasks\Actions\SendEmailAction;

return [
    /*
     * Closed action registry: the only classes a scheduled task can ever execute.
     * User input selects a key from this list and is never interpreted as a class name.
     */
    'actions' => [
        'export-map' => RunExportMapAction::class,
        'send-email' => SendEmailAction::class,
        'stock-sync' => \App\ScheduledTasks\Actions\RunStockSyncAction::class,
    ],

    /*
     * Platform events a task may subscribe to via the after_event trigger.
     */
    'events' => [
        'stock-sync-finished' => \App\Events\StockSyncFinished::class,
    ],

    'defaults' => [
        // Per-action execution budget when the action row does not set one (seconds)
        'action_timeout' => 300,
        // Extra headroom added to the summed action timeouts for the job-level hard limit
        'job_headroom' => 60,
    ],

    // Finished runs older than this are pruned (AUTO-467: two weeks)
    'retention_days' => 14,
];
