Usage payload debug

This commit is contained in:
shimon 2024-12-12 20:20:47 +02:00
parent 158954df0b
commit 717b06950e

View file

@ -60,12 +60,13 @@ class Usage extends Action
}
$document = $payload['project'] ?? [];
$project = new Document($document);
if (empty($document)) {
if (empty($project->getAttribute('database'))) {
var_dump(1);
var_dump($payload);
}
$project = new Document($document);
$projectId = $project->getInternalId();
foreach ($payload['reduce'] ?? [] as $document) {
if (empty($document)) {
@ -80,6 +81,11 @@ class Usage extends Action
);
}
if (empty($project->getAttribute('database'))) {
var_dump(2);
var_dump($payload);
}
$this->stats[$projectId]['project'] = [
'$id' => $project->getId(),
'$internalId' => $project->getInternalId(),