1
0
Fork 0
mirror of synced 2024-07-06 07:00:56 +12:00

Addressed comments

This commit is contained in:
shimon 2024-02-15 17:12:37 +02:00
parent f0a4cf78ab
commit 2a5f21e982
2 changed files with 4 additions and 2 deletions

View file

@ -253,7 +253,6 @@ try {
Console::error($e->getMessage() . ', File: ' . $e->getFile() . ', Line: ' . $e->getLine());
}
$worker = $platform->getWorker();
$worker
@ -268,7 +267,8 @@ $worker
->inject('error')
->inject('logger')
->inject('log')
->action(function (Throwable $error, ?Logger $logger, Log $log) {
->inject('project')
->action(function (Throwable $error, ?Logger $logger, Log $log, Document $project) {
$version = App::getEnv('_APP_VERSION', 'UNKNOWN');
if ($error instanceof PDOException) {
@ -284,6 +284,7 @@ $worker
$log->setAction('appwrite-queue-' . App::getEnv('QUEUE'));
$log->addTag('verboseType', get_class($error));
$log->addTag('code', $error->getCode());
$log->addTag('projectId', $project->getInternalId() ?? 'n/a');
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());

View file

@ -365,6 +365,7 @@ class Mail extends Event
$client = new Client($this->queue, $this->connection);
return $client->enqueue([
'project' => $this->project,
'recipient' => $this->recipient,
'name' => $this->name,
'subject' => $this->subject,