summaryrefslogtreecommitdiff
path: root/app/Subscriber
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-19 22:38:30 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-19 22:38:30 -0400
commit390082aa41cb81610089163b1cc3a256f3b3c513 (patch)
tree1ada3964702ee536fe1486f34230f8e30a95d82e /app/Subscriber
parentd9d37882228771bca0c7f53f5ffcef90ba7ac1c5 (diff)
Refactoring of internal task events
Diffstat (limited to 'app/Subscriber')
-rw-r--r--app/Subscriber/NotificationSubscriber.php6
-rw-r--r--app/Subscriber/ProjectModificationDateSubscriber.php6
2 files changed, 3 insertions, 9 deletions
diff --git a/app/Subscriber/NotificationSubscriber.php b/app/Subscriber/NotificationSubscriber.php
index 0b3760c4..104927a0 100644
--- a/app/Subscriber/NotificationSubscriber.php
+++ b/app/Subscriber/NotificationSubscriber.php
@@ -3,7 +3,6 @@
namespace Kanboard\Subscriber;
use Kanboard\Event\GenericEvent;
-use Kanboard\Job\NotificationJob;
use Kanboard\Model\TaskModel;
use Kanboard\Model\CommentModel;
use Kanboard\Model\SubtaskModel;
@@ -38,9 +37,6 @@ class NotificationSubscriber extends BaseSubscriber implements EventSubscriberIn
public function handleEvent(GenericEvent $event, $eventName)
{
$this->logger->debug('Subscriber executed: ' . __METHOD__);
-
- $this->queueManager->push(NotificationJob::getInstance($this->container)
- ->withParams($event, $eventName, get_class($event))
- );
+ $this->queueManager->push($this->notificationJob->withParams($event, $eventName));
}
}
diff --git a/app/Subscriber/ProjectModificationDateSubscriber.php b/app/Subscriber/ProjectModificationDateSubscriber.php
index 97923af9..1ffe0248 100644
--- a/app/Subscriber/ProjectModificationDateSubscriber.php
+++ b/app/Subscriber/ProjectModificationDateSubscriber.php
@@ -24,9 +24,7 @@ class ProjectModificationDateSubscriber extends BaseSubscriber implements EventS
public function execute(GenericEvent $event)
{
- if (isset($event['project_id'])) {
- $this->logger->debug('Subscriber executed: '.__METHOD__);
- $this->projectModel->updateModificationDate($event['project_id']);
- }
+ $this->logger->debug('Subscriber executed: '.__METHOD__);
+ $this->projectModel->updateModificationDate($event['task']['project_id']);
}
}