mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-23 19:25:06 -04:00
Introduce a soft, log-only per-task time budget (jobs_task_max_seconds) separate from the existing web request budget (jobs_web_max_seconds), since PHP cannot preempt a running task mid-execution. - Config: add taskMaxSeconds default (30s) to app/Config/Jobs.php - Controller: validate and persist task_max_seconds in Jobs::postSaveSettings - BoundedTaskRunner: accept taskMaxSeconds, measure task runtime via microtime, log a warning when a task exceeds the threshold - JobRunner: read jobs_task_max_seconds from config and pass it to BoundedTaskRunner - Migration: add AddJobsTaskMaxSecondsConfigKey to seed default app_config value - Language: add en strings for label, validation message, and enabled/disabled tooltips - View: add task_max_seconds form field to settings_config.php, wired to same web-mode enable/disable toggle as web_max_seconds - Tests: update JobsControllerTest to cover new field in save/ validation scenarios Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
39 lines
2.6 KiB
PHP
39 lines
2.6 KiB
PHP
<?php
|
|
|
|
return [
|
|
'add_throttle' => 'Add throttle',
|
|
'mode' => 'Mode',
|
|
'mode_auto' => 'Auto (Cron / Task Scheduler)',
|
|
'mode_invalid' => 'Mode must be one of Auto, Web, or Manual.',
|
|
'mode_manual' => 'Manual',
|
|
'mode_web' => 'Web (No Cron Required)',
|
|
'not_yet_implemented' => 'Not yet implemented — available in a future release.',
|
|
'process_all_jobs' => 'Process All Jobs',
|
|
'process_selected_jobs' => 'Process Selected Jobs',
|
|
'remove_throttle' => 'Remove throttle',
|
|
'saved_successfully' => 'Job Queue settings saved successfully.',
|
|
'saved_unsuccessfully' => 'Job Queue settings could not be saved.',
|
|
'select_jobs' => 'Select Jobs',
|
|
'settings' => 'Settings',
|
|
'settings_configuration' => 'Job Queue Settings',
|
|
'task_max_seconds' => 'Task Time Warning Threshold',
|
|
'task_max_seconds_invalid' => 'Task Time Warning Threshold is required and must be a non-negative integer.',
|
|
'task_max_seconds_tooltip' => 'If a single task runs longer than this many seconds, a warning is logged. Does not stop or limit the task.',
|
|
'task_max_seconds_tooltip_disabled' => 'Task Time Warning Threshold is only available when Mode is set to Web (no cron required).',
|
|
'throttle_count' => 'Count',
|
|
'throttle_count_required' => 'Throttle count is required and must be a non-negative integer.',
|
|
'throttle_period' => 'Period',
|
|
'throttle_period_day' => 'Day',
|
|
'throttle_period_hour' => 'Hour',
|
|
'throttle_period_minute' => 'Minute',
|
|
'throttle_period_month' => 'Month',
|
|
'throttle_period_required' => 'Throttle period is required.',
|
|
'throttles' => 'Throttles',
|
|
'utilities' => 'Utilities',
|
|
'utilities_configuration' => 'Job Queue Utilities',
|
|
'web_max_seconds' => 'Web Mode Max Time',
|
|
'web_max_seconds_invalid' => 'Web Mode Max Time is required and must be a non-negative integer.',
|
|
'web_max_seconds_tooltip' => 'Maximum number of seconds after page load where new jobs are started.',
|
|
'web_max_seconds_tooltip_disabled' => 'Web Mode Max Time is only available when Mode is set to Web (no cron required).',
|
|
];
|