diff --git a/src/Extensions/SiteTreeContentReview.php b/src/Extensions/SiteTreeContentReview.php index a1ede54..5876736 100644 --- a/src/Extensions/SiteTreeContentReview.php +++ b/src/Extensions/SiteTreeContentReview.php @@ -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 ); diff --git a/src/Jobs/ContentReviewNotificationJob.php b/src/Jobs/ContentReviewNotificationJob.php index d409451..fae3a3b 100644 --- a/src/Jobs/ContentReviewNotificationJob.php +++ b/src/Jobs/ContentReviewNotificationJob.php @@ -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) );