fix: event triggers
This commit is contained in:
parent
8b0a78bb36
commit
e976bd3cb1
3 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -337,8 +337,6 @@ class Event
|
|||
default => false
|
||||
};
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'type' => $type,
|
||||
'resource' => $resource,
|
||||
|
|
|
@ -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,
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue