fix: ignore invalid entries from service_usage_monthly

This commit is contained in:
KernelDeimos
2024-10-28 19:09:17 -04:00
parent 193da63304
commit f1087953b5
+8 -1
View File
@@ -61,8 +61,15 @@ module.exports = eggspress('/drivers/usage', {
for ( const row of rows ) {
const app = await get_app({ id: row.app_id });
let extra_parsed;
try {
extra_parsed = JSON.parse(row.extra);
} catch ( e ) {
continue;
}
const identifying_fields = {
service: JSON.parse(row.extra),
service: extra_parsed,
year: row.year,
month: row.month,
};