mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 08:28:42 +00:00
use project internal id
This commit is contained in:
parent
9b2db20b3b
commit
8ddbde62c1
1 changed files with 2 additions and 4 deletions
|
|
@ -342,9 +342,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');
|
||||
$project = $this->database->getDocument('projects', $projectId);
|
||||
$this->database->setNamespace('_' . $project->getInternalId());
|
||||
$this->database->setNamespace('_' . $projectId);
|
||||
|
||||
try {
|
||||
$document = $this->database->getDocument('stats', $id);
|
||||
|
|
@ -430,7 +428,7 @@ class TimeSeries extends Calculator
|
|||
$value = (!empty($point['value'])) ? $point['value'] : 0;
|
||||
|
||||
$this->createOrUpdateMetric(
|
||||
$projectId,
|
||||
$point['projectInternalId'],
|
||||
$point['time'],
|
||||
$period['key'],
|
||||
$metricUpdated,
|
||||
|
|
|
|||
Loading…
Reference in a new issue