Skip to content

Commit

Permalink
Fix fatal task failure check
Browse files Browse the repository at this point in the history
Fixes the failure check (the lock should not be null) and
enhances a comment + styling.
  • Loading branch information
ditsuke committed Sep 5, 2021
1 parent 5657e20 commit fa7f03b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions administrator/components/com_scheduler/src/Task/Task.php
Expand Up @@ -134,9 +134,9 @@ public function run(): bool
/*
* Dispatch event if task lock is not released (NULL). This only happens if the task execution
* was interrupted by a fatal failure.
* @todo add listeners. We can have Email, PushBullet, etc
* @todo add listeners. We can have opt-in hooks for email (priority), push-bullet, etc
*/
if ($this->get('locked') === null)
if ($this->get('locked') !== null)
{
$event = AbstractEvent::create('onTaskRecoverFailure', [
'subject' => $this
Expand Down

0 comments on commit fa7f03b

Please sign in to comment.