FIX Import QueuedJobService namespace in job classes

This commit is contained in:
Robbie Averill 2017-09-07 16:14:37 +12:00
parent de6ca323e0
commit cc7763afa4
2 changed files with 4 additions and 2 deletions

View File

@ -39,6 +39,7 @@ use SilverStripe\Security\Security;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\View\Requirements;
use Symbiote\QueuedJobs\DataObjects\QueuedJobDescriptor;
use Symbiote\QueuedJobs\Services\QueuedJobService;
/**
* Set dates at which content needs to be reviewed and provide a report and emails to alert
@ -642,7 +643,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
$runHour = Config::inst()->get(ContentReviewNotificationJob::class, "first_run_hour");
$firstRunTime = date("Y-m-d H:i:s", mktime($runHour, 0, 0, date("m"), date("d") + 1, date("y")));
singleton("QueuedJobService")->queueJob(
singleton(QueuedJobService::class)->queueJob(
$nextRun,
$firstRunTime
);

View File

@ -7,6 +7,7 @@ use SilverStripe\Control\HTTPRequest;
use SilverStripe\Core\Config\Config;
use Symbiote\QueuedJobs\Services\AbstractQueuedJob;
use Symbiote\QueuedJobs\Services\QueuedJob;
use Symbiote\QueuedJobs\Services\QueuedJobService;
if (!class_exists(AbstractQueuedJob::class)) {
return;
@ -106,7 +107,7 @@ class ContentReviewNotificationJob extends AbstractQueuedJob implements QueuedJo
date("Y")
);
singleton("QueuedJobService")->queueJob(
singleton(QueuedJobService::class)->queueJob(
$nextRun,
date("Y-m-d H:i:s", $nextRunTime)
);