1
0
Fork 0
mirror of synced 2024-07-04 14:10:33 +12:00

fix console namespace

This commit is contained in:
Damodar Lohani 2022-10-21 09:39:59 +00:00
parent 27c4e24fa5
commit e5db5cb4bb
2 changed files with 2 additions and 2 deletions

View file

@ -132,7 +132,7 @@ class Database extends Calculator
$results = [];
$sum = $limit;
$latestDocument = null;
$this->database->setNamespace('_' . $projectId);
$this->database->setNamespace($projectId === 'console' ? $projectId : '_' . $projectId);
while ($sum === $limit) {
try {

View file

@ -301,7 +301,7 @@ class TimeSeries extends Calculator
private function createOrUpdateMetric(string $projectId, string $time, string $period, string $metric, int $value, int $type): void
{
$id = \md5("{$time}_{$period}_{$metric}");
$this->database->setNamespace('_console');
$this->database->setNamespace('console');
$project = $this->database->getDocument('projects', $projectId);
$this->database->setNamespace('_' . $project->getInternalId());