fix issues
This commit is contained in:
parent
ff6c6003fc
commit
e75dfa882b
2 changed files with 1 additions and 4 deletions
|
@ -216,10 +216,8 @@ class Database extends Calculator
|
|||
*/
|
||||
private function count(UtopiaDatabase $database, string $projectId, string $collection, ?string $metric = null): int
|
||||
{
|
||||
$this->database->setNamespace('_' . $projectId);
|
||||
|
||||
try {
|
||||
$count = $this->database->count($collection);
|
||||
$count = $database->count($collection);
|
||||
if (!is_null($metric)) {
|
||||
$this->createPerPeriodMetric($database, $projectId, (string) $metric, $count);
|
||||
}
|
||||
|
|
|
@ -303,7 +303,6 @@ 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');
|
||||
$project = $this->database->getDocument('projects', $projectId);
|
||||
$database = call_user_func($this->getProjectDB, $project);
|
||||
|
||||
|
|
Loading…
Reference in a new issue