PluginPostActivateEvent::
class => 'afterPluginStateChange',
PluginPostDeactivateEvent::
class => 'afterPluginStateChange',
PluginPostUpdateEvent::
class => 'afterPluginStateChange',
];
} public function afterPluginStateChange(): void
{ $this->registry->
registerTasks();
// signal worker restart
$cacheItem =
$this->restartSignalCachePool->
getItem(StopWorkerOnRestartSignalListener::RESTART_REQUESTED_TIMESTAMP_KEY
);
$cacheItem->
set(microtime(true
));
$this->restartSignalCachePool->
save($cacheItem);
}}