-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor functions worker #4659
Conversation
app/workers/builds.php
Outdated
$connection = $pools->get('queue')->pop(); | ||
$functions = new Func($connection->getResource()); | ||
$functions | ||
->setData(\json_encode($data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need to set data. We need to set the payload for events
app/init.php
Outdated
@@ -563,6 +565,7 @@ function (mixed $value) { | |||
$dsns = $connection['dsns'] ?? ''; | |||
$multipe = $connection['multiple'] ?? false; | |||
$schemes = $connection['schemes'] ?? []; | |||
$useResource = $connection['useResource'] ?? true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused. lets remove it
app/worker.php
Outdated
Console::error('[Error] File: ' . $error->getFile()); | ||
Console::error('[Error] Line: ' . $error->getLine()); | ||
|
||
$register->get('pools')->reclaim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove this. We dont use any pools here
app/worker.php
Outdated
->error() | ||
->inject('error') | ||
->inject('logger') | ||
->inject('register') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove this injection as well
app/worker.php
Outdated
$log->setVersion($version); | ||
$log->setType(Log::TYPE_ERROR); | ||
$log->setMessage($error->getMessage()); | ||
$log->setAction('appwrite-worker-functions'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer appwrite-worker-functions
Refactoring functions worker