1
0
Fork 0
mirror of synced 2024-10-03 10:46:27 +13:00

add one more try catch to handle database not found

This commit is contained in:
Damodar Lohani 2022-02-18 03:22:13 +00:00
parent fef659ee26
commit 6dfe1eb389

View file

@ -316,6 +316,7 @@ $cli
}
$query = "SELECT sum(value) AS \"value\" FROM \"{$table}\" WHERE \"time\" > '{$start}' AND \"time\" < '{$end}' AND \"metric_type\"='counter' {$filters} GROUP BY time({$period['key']}), \"projectId\" {$groupBy} FILL(null)";
try {
$result = $database->query($query);
$points = $result->getPoints();
@ -362,6 +363,9 @@ $cli
}
}
}
} catch (\Exception $e) {
Console::warning("Failed to Query: {$e->getMessage()}");
}
}
}
}