-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
openIssue has been acceptedIssue has been accepted
Description
FreePBX Version
FreePBX 16
Issue Description
As mentioned by @kguptasangoma in FreePBX/certman#4 (comment) it seems that an exception on any Job running will kill the whole process. This can be easily fixed by wrapping the individual task in the job runner.
Example:
private function runJobs($jobs = []) {
// ... (Existing code) ...
foreach($jobs as $config) {
// ... (Existing code within the loop) ...
try {
// ... (Job execution logic) ...
} catch (\Exception $e) {
$msg = "<error> ". sprintf(_("Error in the task %s Exception = %s"),$config['job'],$e->getMessage())." </error>";
$this->writelog($msg);
// Optionally, you might want to add specific failure handling or
// retry logic for the individual job here.
}
}
// ... (Rest of the function) ...
}
Operating Environment
All versions FreePBX 15+
Relevant log output
No response
Metadata
Metadata
Assignees
Labels
openIssue has been acceptedIssue has been accepted