mirror of
https://github.com/appwrite/appwrite
synced 2026-05-06 06:48:22 +00:00
Fix db issues
This commit is contained in:
parent
d1ab8c4df8
commit
8fea73d3bf
2 changed files with 9 additions and 5 deletions
|
|
@ -370,6 +370,7 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
|
|||
$queueForFunctions
|
||||
->setType('delayed_execution_write')
|
||||
->setExecution($execution)
|
||||
->setProject($project)
|
||||
->trigger();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,14 @@ class Functions extends Action
|
|||
}
|
||||
|
||||
$type = $payload['type'] ?? '';
|
||||
|
||||
// Short-term solution to offhand write operation from API contianer
|
||||
if ($type === 'delayed_execution_write') {
|
||||
$execution = new Document($payload['execution'] ?? []);
|
||||
$execution = $dbForProject->createDocument('executions', $execution);
|
||||
return;
|
||||
}
|
||||
|
||||
$events = $payload['events'] ?? [];
|
||||
$data = $payload['body'] ?? '';
|
||||
$eventData = $payload['payload'] ?? '';
|
||||
|
|
@ -209,11 +217,6 @@ class Functions extends Action
|
|||
executionId: $execution->getId() ?? null
|
||||
);
|
||||
break;
|
||||
case 'delayed_execution_write':
|
||||
$execution = new Document($payload['execution'] ?? []);
|
||||
$execution->setAttribute('$collection', 'executions');
|
||||
$execution = $dbForProject->createDocument('executions', $execution);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue