Fix event-triggered multi-execution
This commit is contained in:
parent
69a4f51d58
commit
c93b7aa452
1 changed files with 15 additions and 11 deletions
|
@ -74,18 +74,22 @@ class FunctionsV1 extends Worker
|
||||||
|
|
||||||
Console::success('Iterating function: ' . $function->getAttribute('name'));
|
Console::success('Iterating function: ' . $function->getAttribute('name'));
|
||||||
|
|
||||||
$this->execute(
|
try {
|
||||||
project: $project,
|
$this->execute(
|
||||||
function: $function,
|
project: $project,
|
||||||
dbForProject: $database,
|
function: $function,
|
||||||
trigger: 'event',
|
dbForProject: $database,
|
||||||
// Pass first, most verbose event pattern
|
trigger: 'event',
|
||||||
event: $events[0],
|
// Pass first, most verbose event pattern
|
||||||
eventData: $payload,
|
event: $events[0],
|
||||||
user: $user
|
eventData: $payload,
|
||||||
);
|
user: $user
|
||||||
|
);
|
||||||
|
|
||||||
Console::success('Triggered function: ' . $events[0]);
|
Console::success('Triggered function: ' . $events[0]);
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
Console::error("Failed to execute " . $function->getAttribute('id') . " with error: " . $th->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue