diff --git a/PageTree/PageTreeRouteUpdateHandler.php b/PageTree/PageTreeRouteUpdateHandler.php index 82259edf1..b16e79207 100644 --- a/PageTree/PageTreeRouteUpdateHandler.php +++ b/PageTree/PageTreeRouteUpdateHandler.php @@ -16,11 +16,12 @@ use Sulu\Bundle\ContentBundle\Document\BasePageDocument; use Sulu\Component\DocumentManager\DocumentManagerInterface; use Symfony\Component\OptionsResolver\OptionsResolver; +use Task\Lock\LockingTaskHandlerInterface; /** * Task-Handler to update page-tree-routes. */ -class PageTreeRouteUpdateHandler implements AutomationTaskHandlerInterface +class PageTreeRouteUpdateHandler implements AutomationTaskHandlerInterface, LockingTaskHandlerInterface { /** * @var PageTreeUpdaterInterface @@ -79,4 +80,12 @@ public function handle($workload) $this->documentManager->flush(); } + + /** + * {@inheritdoc} + */ + public function getLockKey($workload) + { + return self::class; + } }