mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-01 21:46:38 +00:00
Use transactions
This commit is contained in:
@@ -147,7 +147,9 @@ async function flushSitePingsToDb(): Promise<void> {
|
||||
}, "flushSitePingsToDb");
|
||||
|
||||
for (const site of newlyOnlineSites) {
|
||||
await fireSiteOnlineAlert(site.orgId, site.siteId, site.name);
|
||||
await db.transaction(async (trx) => {
|
||||
await fireSiteOnlineAlert(site.orgId, site.siteId, site.name, undefined, trx);
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
|
||||
Reference in New Issue
Block a user