mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
chore: prevent console project to queue for delete stats
This commit is contained in:
parent
ae00a69592
commit
46693faa67
1 changed files with 10 additions and 8 deletions
|
|
@ -417,20 +417,22 @@ class Deletes extends Action
|
|||
/** @var \Utopia\Database\Database $dbForProject*/
|
||||
$dbForProject = $getProjectDB($project);
|
||||
|
||||
/** @var \Utopia\Database\Database $dbForLogs*/
|
||||
$dbForLogs = call_user_func($getLogsDB, $project);
|
||||
|
||||
// Delete Usage stats from projectDB
|
||||
$this->deleteByGroup('stats', [
|
||||
Query::lessThan('time', $hourlyUsageRetentionDatetime),
|
||||
Query::equal('period', ['1h']),
|
||||
], $dbForProject);
|
||||
|
||||
// Delete Usage stats from logsDB
|
||||
$this->deleteByGroup('stats', [
|
||||
Query::lessThan('time', $hourlyUsageRetentionDatetime),
|
||||
Query::equal('period', ['1h']),
|
||||
], $dbForLogs);
|
||||
if ($project->getId() !== 'console') {
|
||||
/** @var \Utopia\Database\Database $dbForLogs*/
|
||||
$dbForLogs = call_user_func($getLogsDB, $project);
|
||||
|
||||
// Delete Usage stats from logsDB
|
||||
$this->deleteByGroup('stats', [
|
||||
Query::lessThan('time', $hourlyUsageRetentionDatetime),
|
||||
Query::equal('period', ['1h']),
|
||||
], $dbForLogs);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue