Merge pull request #9354 from appwrite/fix-image-transformation-metric-time

Fix: metric time was not being written to DB
This commit is contained in:
Christy Jacob 2025-02-13 14:41:52 +05:30 committed by GitHub
commit 608a2cc67b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -354,10 +354,11 @@ class StatsResources extends Action
'period' => $period,
'region' => $region,
'value' => $value,
'time' => $time,
]);
}
} else {
$time = 'inf' === $period ? null : \date($this->periods[$period], \time());
$time = $period === 'inf' ? null : \date($this->periods[$period], \time());
$id = \md5("{$time}_{$period}_{$metric}");
$this->documents[] = new Document([
'$id' => $id,
@ -365,6 +366,7 @@ class StatsResources extends Action
'period' => $period,
'region' => $region,
'value' => $value,
'time' => $time,
]);
}
}