mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
update usage worker and hook
This commit is contained in:
@@ -274,6 +274,9 @@ $worker
|
||||
Console::error('[Error] Line: ' . $error->getLine());
|
||||
});
|
||||
|
||||
// We need to add `getWorkerStartHook` in `utopia-php/queue` so that we can check if
|
||||
// we have already added workerStart hook, if not we can add this default worker start hook here
|
||||
|
||||
// $worker->workerStart()
|
||||
// ->action(function () use ($workerName) {
|
||||
// Console::info("Worker $workerName started");
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
QUEUE=v1-usage php /usr/src/code/app/workers/usage.php $@
|
||||
php /usr/src/code/app/worker.php usage $@
|
||||
Generated
+4
-4
@@ -1950,12 +1950,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/platform.git",
|
||||
"reference": "fa29008a786800821f35579c043e29072bcd614a"
|
||||
"reference": "e770add70a6fcdd4757dd5b0e58470ff67aaf0e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/fa29008a786800821f35579c043e29072bcd614a",
|
||||
"reference": "fa29008a786800821f35579c043e29072bcd614a",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/e770add70a6fcdd4757dd5b0e58470ff67aaf0e2",
|
||||
"reference": "e770add70a6fcdd4757dd5b0e58470ff67aaf0e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1992,7 +1992,7 @@
|
||||
"issues": "https://github.com/utopia-php/platform/issues",
|
||||
"source": "https://github.com/utopia-php/platform/tree/integrate-workers-dl"
|
||||
},
|
||||
"time": "2023-07-09T09:26:28+00:00"
|
||||
"time": "2023-07-09T09:39:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/pools",
|
||||
|
||||
@@ -13,6 +13,7 @@ use Appwrite\Platform\Workers\Functions;
|
||||
use Appwrite\Platform\Workers\Builds;
|
||||
use Appwrite\Platform\Workers\Deletes;
|
||||
use Appwrite\Platform\Workers\Usage;
|
||||
use Appwrite\Platform\Workers\UsageHook;
|
||||
|
||||
class Workers extends Service
|
||||
{
|
||||
@@ -29,7 +30,8 @@ class Workers extends Service
|
||||
->addAction(Functions::getName(), new Functions())
|
||||
->addAction(Builds::getName(), new Builds())
|
||||
->addAction(Deletes::getName(), new Deletes())
|
||||
//->addAction(Usage::getName(), new Usage())
|
||||
->addAction(Usage::getName(), new Usage())
|
||||
->addAction(UsageHook::getName(), new UsageHook())
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class UsageHook extends Usage {
|
||||
|
||||
public static function getName(): string
|
||||
{
|
||||
return 'usage';
|
||||
return 'usageHook';
|
||||
}
|
||||
|
||||
public function action($register, $cache, $pools): void
|
||||
|
||||
Reference in New Issue
Block a user