Skip to content

Commit

Permalink
Skip creating savepoint if there are no SQL queries
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienGllmt committed May 24, 2024
1 parent ae91c66 commit 70898ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/engine/paima-sm/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ async function processScheduledData(
doLog(`[paima-sm] Error on scheduled data STF call. Skipping`, err);
continue;
}
if (sqlQueries.length === 0) continue;

await tryOrRollback(DBConn, async () => {
for (const [query, params] of sqlQueries) {
Expand Down Expand Up @@ -461,6 +462,7 @@ async function processUserInputs(
doLog(`[paima-sm] Error on user input STF call. Skipping`, err);
continue;
}
if (sqlQueries.length === 0) continue;

await tryOrRollback(DBConn, async () => {
for (const [query, params] of sqlQueries) {
Expand Down

0 comments on commit 70898ae

Please sign in to comment.