mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Improve logs
This commit is contained in:
parent
cedc4eb2df
commit
675179def8
2 changed files with 4 additions and 15 deletions
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue