QA bug fixes
This commit is contained in:
parent
44a82de09b
commit
6bf370a058
|
@ -1157,8 +1157,7 @@ App::post('/v1/functions/:functionId/executions')
|
|||
->setData($data)
|
||||
->setJWT($jwt)
|
||||
->setProject($project)
|
||||
->setUser($user)
|
||||
->trigger();
|
||||
->setUser($user);
|
||||
|
||||
return $response
|
||||
->setStatusCode(Response::STATUS_CODE_ACCEPTED)
|
||||
|
|
|
@ -33,7 +33,7 @@ Server::setResource('dbForConsole', function (Cache $cache, Registry $register)
|
|||
}, ['cache', 'register']);
|
||||
|
||||
Server::setResource('dbForProject', function (Cache $cache, Registry $register, Message $message, Database $dbForConsole) {
|
||||
$args = $message->getPayload()['value'] ?? [];
|
||||
$args = $message->getPayload() ?? [];
|
||||
$project = new Document($args['project'] ?? []);
|
||||
|
||||
if ($project->isEmpty() || $project->getId() === 'console') {
|
||||
|
|
|
@ -106,11 +106,11 @@ class BuildsV1 extends Worker
|
|||
$build->setAttribute('status', 'building');
|
||||
$build = $dbForProject->updateDocument('builds', $buildId, $build);
|
||||
|
||||
$data = $deployment->getArrayCopy(array_keys($deploymentModel->getRules()));
|
||||
|
||||
/** Trigger Webhook */
|
||||
$deploymentModel = new Deployment();
|
||||
|
||||
$data = $deployment->getArrayCopy(array_keys($deploymentModel->getRules()));
|
||||
|
||||
$deploymentUpdate = new Event(Event::WEBHOOK_QUEUE_NAME, Event::WEBHOOK_CLASS_NAME);
|
||||
$deploymentUpdate
|
||||
->setProject($project)
|
||||
|
|
|
@ -43,11 +43,11 @@ $execute = function (
|
|||
?Document $user = null,
|
||||
string $jwt = null
|
||||
) use ($executor, $register) {
|
||||
|
||||
$user ??= new Document();
|
||||
$functionId = $function->getId();
|
||||
$deploymentId = $function->getAttribute('deployment', '');
|
||||
|
||||
|
||||
/** Check if deployment exists */
|
||||
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
|
||||
|
||||
|
@ -209,7 +209,7 @@ $execute = function (
|
|||
|
||||
/** Trigger Functions */
|
||||
$functions
|
||||
->setData($data)
|
||||
->setData($data ?? '')
|
||||
->setProject($project)
|
||||
->setUser($user)
|
||||
->setEvent('functions.[functionId].executions.[executionId].update')
|
||||
|
@ -333,7 +333,7 @@ $server->job()
|
|||
$data = $args['data'] ?? '';
|
||||
$execution = new Document($args['execution'] ?? []);
|
||||
$user = new Document($args['user'] ?? []);
|
||||
$function = $dbForProject->getDocument('functions', $execution->getAttribute('functionId'));
|
||||
// $function = $dbForProject->getDocument('functions', $execution->getAttribute('functionId'));
|
||||
call_user_func($execute, $project, $function, $dbForProject, $functions, 'http', $execution->getId(), null, null, $data, $user, $jwt);
|
||||
break;
|
||||
case 'schedule':
|
||||
|
|
Loading…
Reference in a new issue