Add async exec doc test

This commit is contained in:
Matej Bačo
2024-10-14 13:06:08 +00:00
parent 16a8fdce4e
commit 408dcbc263
4 changed files with 15 additions and 2 deletions
+2
View File
@@ -8,6 +8,8 @@ use Utopia\Queue\Connection;
class Func extends Event
{
public const TYPE_ASYNC_WRITE = 'async_write';
protected string $jwt = '';
protected string $type = '';
protected string $body = '';
+1 -1
View File
@@ -74,7 +74,7 @@ class Functions extends Action
$type = $payload['type'] ?? '';
// Short-term solution to offhand write operation from API contianer
if ($type === 'delayed_execution_write') {
if ($type === Func::TYPE_ASYNC_WRITE) {
$execution = new Document($payload['execution'] ?? []);
$execution = $dbForProject->createDocument('executions', $execution);
return;