From 675179def889829556956f2f83f564cfa8a3d804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 27 May 2025 11:41:46 +0200 Subject: [PATCH] Improve logs --- src/Appwrite/Platform/Modules/Compute/Base.php | 10 ++++------ .../Functions/Http/Functions/Deployment/Update.php | 9 --------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Compute/Base.php b/src/Appwrite/Platform/Modules/Compute/Base.php index d09daa29da..46f82af661 100644 --- a/src/Appwrite/Platform/Modules/Compute/Base.php +++ b/src/Appwrite/Platform/Modules/Compute/Base.php @@ -240,8 +240,10 @@ class Base extends Action { $limit = 100; $cursor = null; - + do { + \var_dump("Project internal ID: " . $project->getInternalId()); + $queries = \array_merge([ Query::limit($limit), Query::equal("projectInternalId", [$project->getInternalId()]) @@ -251,9 +253,8 @@ class Base extends Action $queries[] = Query::cursorAfter($cursor); } - \var_dump("Actual find"); + \var_dump($queries); $results = Authorization::skip(fn () => $database->find('rules', $queries)); - \var_dump($results); $total = \count($results); if ($total > 0) { @@ -265,11 +266,8 @@ class Base extends Action } foreach ($results as $document) { - \var_dump("In foreach"); if (is_callable($callback)) { - \var_dump("Callback start"); $callback($document); - \var_dump("Callback end"); } } } while (!\is_null($cursor)); diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php index 726c1dec2b..f57ec8483c 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Functions/Deployment/Update.php @@ -110,22 +110,13 @@ class Update extends Base Query::equal("deploymentResourceInternalId", [$function->getInternalId()]), Query::equal("deploymentVcsProviderBranch", [""]), ]; - - \var_dump("About to set to deployment ID " . $deployment->getId()); - \var_dump("Project ID: " . $project->getId()); - \var_dump("Project internal ID: " . $project->getInternalId()); - \var_dump("Function internal ID: " . $function->getInternalId()); $this->listRules($project, $queries, $dbForPlatform, function (Document $rule) use ($dbForPlatform, $deployment) { - \var_dump("Updating rule" . $rule->getId()); $rule = $rule ->setAttribute('deploymentId', $deployment->getId()) ->setAttribute('deploymentInternalId', $deployment->getInternalId()); Authorization::skip(fn () => $dbForPlatform->updateDocument('rules', $rule->getId(), $rule)); - \var_dump("Successfully updated " . $rule->getId()); }); - - \var_dump("Post update"); $queueForEvents ->setParam('functionId', $function->getId())