1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

fix: event triggers

This commit is contained in:
Christy Jacob 2022-11-16 11:22:19 +05:30
parent 8b0a78bb36
commit e976bd3cb1
3 changed files with 3 additions and 5 deletions

View file

@ -51,7 +51,6 @@ Server::setResource('execute', function () {
$user ??= new Document();
$functionId = $function->getId();
$deploymentId = $function->getAttribute('deployment', '');
var_dump("Deployment ID : ", $deploymentId);
/** Check if deployment exists */
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
@ -286,7 +285,6 @@ $server->job()
$project = new Document($payload['project'] ?? []);
$function = new Document($payload['function'] ?? []);
$user = new Document($payload['user'] ?? []);
var_dump("Function : ", $function);
if ($project->getId() === 'console') {
return;

View file

@ -337,8 +337,6 @@ class Event
default => false
};
return [
'type' => $type,
'resource' => $resource,

View file

@ -147,6 +147,8 @@ class Func extends Event
{
$client = new Client($this->queue, $this->connection);
$events = $this->getEvent() ? Event::generateEvents($this->getEvent(), $this->getParams()) : null;
return $client->enqueue([
'project' => $this->project,
'user' => $this->user,
@ -155,7 +157,7 @@ class Func extends Event
'type' => $this->type,
'jwt' => $this->jwt,
'payload' => '',
'events' => Event::generateEvents($this->getEvent(), $this->getParams()),
'events' => $events,
'data' => $this->data,
]);
}