mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch 'feat-functions-refactor' of github.com:appwrite/appwrite into feat-add-builds-worker
This commit is contained in:
@@ -309,15 +309,15 @@ class DeletesV1 extends Worker
|
||||
$dbForProject = $this->getProjectDB($projectId);
|
||||
$device = new Local(APP_STORAGE_FUNCTIONS . '/app-' . $projectId);
|
||||
|
||||
// Delete Tags
|
||||
$this->deleteByGroup('tags', [
|
||||
// Delete Deployments
|
||||
$this->deleteByGroup('deployments', [
|
||||
new Query('functionId', Query::TYPE_EQUAL, [$document->getId()])
|
||||
], $dbForProject, function (Document $document) use ($device) {
|
||||
|
||||
if ($device->delete($document->getAttribute('path', ''))) {
|
||||
Console::success('Delete code tag: ' . $document->getAttribute('path', ''));
|
||||
Console::success('Delete code deployment: ' . $document->getAttribute('path', ''));
|
||||
} else {
|
||||
Console::error('Failed to delete code tag: ' . $document->getAttribute('path', ''));
|
||||
Console::error('Failed to delete code deployment: ' . $document->getAttribute('path', ''));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -84,11 +84,11 @@ class FunctionsV1 extends Worker
|
||||
|
||||
foreach ($functions as $function) {
|
||||
$events = $function->getAttribute('events', []);
|
||||
$tag = $function->getAttribute('tag', []);
|
||||
$deployment = $function->getAttribute('deployment', []);
|
||||
|
||||
Console::success('Itterating function: ' . $function->getAttribute('name'));
|
||||
|
||||
if (!\in_array($event, $events) || empty($tag)) {
|
||||
if (!\in_array($event, $events) || empty($deployment)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ class FunctionsV1 extends Worker
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute function tag
|
||||
* Execute function deployment
|
||||
*
|
||||
* @param string $trigger
|
||||
* @param string $projectId
|
||||
|
||||
Reference in New Issue
Block a user