diff --git a/app/Console/Command/EventShell.php b/app/Console/Command/EventShell.php index 658e4a005..7c918d37c 100644 --- a/app/Console/Command/EventShell.php +++ b/app/Console/Command/EventShell.php @@ -390,8 +390,7 @@ class EventShell extends AppShell $user = $this->getUser($userId); $job = $this->Job->read(null, $jobId); $this->Event->Behaviors->unload('SysLogLogable.SysLogLogable'); - // $result = $this->Event->publish($id, $passAlong); - $result = true; + $result = $this->Event->publish($id, $passAlong); $job['Job']['progress'] = 100; $job['Job']['status'] = Job::STATUS_COMPLETED; $job['Job']['date_modified'] = date("Y-m-d H:i:s"); diff --git a/app/Lib/Tools/BackgroundJobsTool.php b/app/Lib/Tools/BackgroundJobsTool.php index 9b8b7663c..15313a098 100644 --- a/app/Lib/Tools/BackgroundJobsTool.php +++ b/app/Lib/Tools/BackgroundJobsTool.php @@ -68,10 +68,14 @@ class BackgroundJobsTool self::UPDATE_QUEUE, ]; - public const CMD_EVENT_SHELL = 'event'; + public const CMD_EVENT = 'event'; public const ALLOWED_COMMANDS = [ - self::CMD_EVENT_SHELL + self::CMD_EVENT + ]; + + public const CMD_TO_SHELL_DICT = [ + self::CMD_EVENT => 'EventShell' ]; public const JOB_STATUS_PREFIX = 'job_status'; @@ -130,7 +134,7 @@ class BackgroundJobsTool ): string { if ($this->settings['use_resque']) { - $this->resqueEnqueue($queue, $command, $args, $trackStatus, $job); + $this->resqueEnqueue($queue, self::CMD_TO_SHELL_DICT[$command], $args, $trackStatus, $job); } $this->validateQueue($queue); diff --git a/app/Model/Event.php b/app/Model/Event.php index f25517d1c..f2b55b96b 100755 --- a/app/Model/Event.php +++ b/app/Model/Event.php @@ -4553,7 +4553,7 @@ class Event extends AppModel return $this->getBackgroundJobsTool()->enqueue( BackgroundJobsTool::PRIO_QUEUE, - BackgroundJobsTool::CMD_EVENT_SHELL, + BackgroundJobsTool::CMD_EVENT, [ 'publish', $id,