Add functions.executions.update
This commit is contained in:
parent
f734fc1de2
commit
731c87d740
2 changed files with 27 additions and 0 deletions
|
@ -132,6 +132,11 @@ return [
|
||||||
'model' => Response::MODEL_EXECUTION,
|
'model' => Response::MODEL_EXECUTION,
|
||||||
'note' => 'version >= 0.7',
|
'note' => 'version >= 0.7',
|
||||||
],
|
],
|
||||||
|
'functions.executions.update' => [
|
||||||
|
'description' => 'This event triggers when a function execution is updated.',
|
||||||
|
'model' => Response::MODEL_EXECUTION,
|
||||||
|
'note' => 'version >= 0.7',
|
||||||
|
],
|
||||||
'storage.files.create' => [
|
'storage.files.create' => [
|
||||||
'description' => 'This event triggers when a storage file is created.',
|
'description' => 'This event triggers when a storage file is created.',
|
||||||
'model' => Response::MODEL_FILE,
|
'model' => Response::MODEL_FILE,
|
||||||
|
|
|
@ -469,6 +469,28 @@ class FunctionsV1
|
||||||
throw new Exception('Failed saving execution to DB', 500);
|
throw new Exception('Failed saving execution to DB', 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var_dump($execution);
|
||||||
|
$executionUpdate = new Event('v1-webhooks', 'WebhooksV1');
|
||||||
|
|
||||||
|
$executionUpdate
|
||||||
|
->setParam('projectId', $projectId)
|
||||||
|
->setParam('userId', '')
|
||||||
|
->setParam('event', 'functions.executions.update')
|
||||||
|
->setParam('payload', [
|
||||||
|
'$id' => $execution['$id'],
|
||||||
|
'functionId' => $execution['functionId'],
|
||||||
|
'dateCreated' => $execution['dateCreated'],
|
||||||
|
'trigger' => $execution['trigger'],
|
||||||
|
'status' => $execution['status'],
|
||||||
|
'exitCode' => $execution['exitCode'],
|
||||||
|
'stdout' => $execution['stdout'],
|
||||||
|
'stderr' => $execution['stderr'],
|
||||||
|
'time' => $execution['time']
|
||||||
|
]);
|
||||||
|
|
||||||
|
$executionUpdate->trigger();
|
||||||
|
|
||||||
|
|
||||||
$usage = new Event('v1-usage', 'UsageV1');
|
$usage = new Event('v1-usage', 'UsageV1');
|
||||||
|
|
||||||
$usage
|
$usage
|
||||||
|
|
Loading…
Reference in a new issue