mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 01:18:37 +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
|
$queueForFunctions
|
||||||
->setType('delayed_execution_write')
|
->setType('delayed_execution_write')
|
||||||
->setExecution($execution)
|
->setExecution($execution)
|
||||||
|
->setProject($project)
|
||||||
->trigger();
|
->trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,14 @@ class Functions extends Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$type = $payload['type'] ?? '';
|
$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'] ?? [];
|
$events = $payload['events'] ?? [];
|
||||||
$data = $payload['body'] ?? '';
|
$data = $payload['body'] ?? '';
|
||||||
$eventData = $payload['payload'] ?? '';
|
$eventData = $payload['payload'] ?? '';
|
||||||
|
|
@ -209,11 +217,6 @@ class Functions extends Action
|
||||||
executionId: $execution->getId() ?? null
|
executionId: $execution->getId() ?? null
|
||||||
);
|
);
|
||||||
break;
|
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