Fix upsert

This commit is contained in:
Jake Barnby
2025-10-01 00:13:09 +13:00
parent f0983cd9ff
commit 1226c0834c
+2 -2
View File
@@ -452,7 +452,7 @@ class StatsUsage extends Action
return strcmp($a['time'], $b['time']);
});
$dbForProject->createOrUpdateDocumentsWithIncrease('stats', 'value', $projectStats['stats']);
$dbForProject->upsertDocumentsWithIncrease('stats', 'value', $projectStats['stats']);
Console::success('Batch successfully written to DB');
} catch (Throwable $e) {
Console::error('Error processing stats: ' . $e->getMessage());
@@ -532,7 +532,7 @@ class StatsUsage extends Action
return strcmp($a['time'], $b['time']);
});
$dbForLogs->createOrUpdateDocumentsWithIncrease(
$dbForLogs->upsertDocumentsWithIncrease(
'stats',
'value',
$this->statDocuments