Added QueueManager to process background jobs

This commit is contained in:
Frederic Guillot
2016-05-23 20:43:51 -04:00
parent dc6176fca2
commit 8314c99b56
29 changed files with 427 additions and 34 deletions

View File

@@ -3,6 +3,7 @@
namespace Kanboard\Subscriber;
use Kanboard\Event\TaskEvent;
use Kanboard\Job\ProjectMetricJob;
use Kanboard\Model\Task;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -23,8 +24,7 @@ class ProjectDailySummarySubscriber extends BaseSubscriber implements EventSubsc
{
if (isset($event['project_id']) && !$this->isExecuted()) {
$this->logger->debug('Subscriber executed: '.__METHOD__);
$this->projectDailyColumnStats->updateTotals($event['project_id'], date('Y-m-d'));
$this->projectDailyStats->updateTotals($event['project_id'], date('Y-m-d'));
$this->queueManager->push(ProjectMetricJob::getInstance($this->container)->withParams($event['project_id']));
}
}
}