1
0
Fork 0
mirror of synced 2024-10-01 01:37:56 +13:00

Handle missing database

This commit is contained in:
Bradley Schofield 2024-09-24 16:10:52 +09:00
parent 001d13d7e9
commit fb1c0c85b0

View file

@ -214,7 +214,16 @@ class UsageDump extends Action
case METRIC_DATABASE_LEVEL_STORAGE:
Console::log('[' . DateTime::now() . '] Database Level Storage Calculation [' . $key . ']');
$databaseInternalId = $data[0];
$collections = [];
try {
$collections = $dbForProject->find('database_' . $databaseInternalId);
} catch (\Exception $e) {
// Database not found
if ($e->getMessage() !== 'Collection not found') {
throw $e;
}
}
foreach ($collections as $collection) {
try {