Skip to content

Commit

Permalink
disable advisory locks
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktrn committed May 10, 2024
1 parent 203e002 commit da1421b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions apps/webapp/app/services/runs/startRun.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export class StartRunService {
await $transaction(
this.#prismaClient,
async (tx) => {
await tx.$executeRaw`SELECT pg_advisory_xact_lock(${lockId})`;

const counter = await tx.jobCounter.upsert({
where: { jobId: run.jobId },
update: { lastNumber: { increment: 1 } },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ export class HandleWebhookRequestService {
const lockId = webhookIdToLockId(webhookEnvironment.webhookId);

await this.#prismaClient.$transaction(async (tx) => {
await tx.$executeRaw`SELECT pg_advisory_xact_lock(${lockId})`;

const counter = await tx.webhookDeliveryCounter.upsert({
where: { webhookId: webhookEnvironment.id },
update: { lastNumber: { increment: 1 } },
Expand Down
2 changes: 0 additions & 2 deletions apps/webapp/app/v3/services/triggerTask.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ export class TriggerTaskService extends BaseService {
const lockId = taskIdentifierToLockId(taskId);

const run = await $transaction(this._prisma, async (tx) => {
await tx.$executeRaw`SELECT pg_advisory_xact_lock(${lockId})`;

const lockedToBackgroundWorker = body.options?.lockToVersion
? await tx.backgroundWorker.findUnique({
where: {
Expand Down

0 comments on commit da1421b

Please sign in to comment.