summaryrefslogtreecommitdiff
path: root/app/Subscriber
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-23 20:30:06 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-23 20:30:06 -0400
commitadb5023cfc075ce5d6f73a4ba5b4ab51f6c500c0 (patch)
tree4333191b7f866ea5f5864df9173e61aa7e0d58b5 /app/Subscriber
parent8e6e335c9d99ff710ecd70dff293f15a25bf9a98 (diff)
Add unit test for ProjectMetricJob
Diffstat (limited to 'app/Subscriber')
-rw-r--r--app/Subscriber/ProjectDailySummarySubscriber.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/app/Subscriber/ProjectDailySummarySubscriber.php b/app/Subscriber/ProjectDailySummarySubscriber.php
index 7e3c11c3..eaa9d468 100644
--- a/app/Subscriber/ProjectDailySummarySubscriber.php
+++ b/app/Subscriber/ProjectDailySummarySubscriber.php
@@ -3,7 +3,6 @@
namespace Kanboard\Subscriber;
use Kanboard\Event\TaskEvent;
-use Kanboard\Job\ProjectMetricJob;
use Kanboard\Model\TaskModel;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -22,9 +21,7 @@ class ProjectDailySummarySubscriber extends BaseSubscriber implements EventSubsc
public function execute(TaskEvent $event)
{
- if (isset($event['project_id'])) {
- $this->logger->debug('Subscriber executed: '.__METHOD__);
- $this->queueManager->push(ProjectMetricJob::getInstance($this->container)->withParams($event['project_id']));
- }
+ $this->logger->debug('Subscriber executed: '.__METHOD__);
+ $this->queueManager->push($this->projectMetricJob->withParams($event['task']['project_id']));
}
}