mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
remove worker hook
This commit is contained in:
parent
06c09503df
commit
c7713f58dd
1 changed files with 0 additions and 14 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue