remove worker hook

This commit is contained in:
Damodar Lohani 2024-12-17 13:52:58 +00:00
parent 06c09503df
commit c7713f58dd

View file

@ -380,20 +380,6 @@ try {
$worker = $platform->getWorker();
$worker
->init()
->inject('project')
->inject('dbForConsole')
->action(function (Document $project, Database $dbForConsole) {
if (!$project->isEmpty() && $project->getId() !== 'console') {
$accessedAt = $project->getAttribute('accessedAt', '');
if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_PROJECT_ACCESS)) > $accessedAt) {
$project->setAttribute('accessedAt', DateTime::now());
Authorization::skip(fn () => $dbForConsole->updateDocument('projects', $project->getId(), $project));
}
}
});
$worker
->shutdown()
->inject('pools')