Skip to content

Commit 293dc79

Browse files
committed
fix(db): no-activity decision read stays on the primary
1 parent 4f92b15 commit 293dc79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/sim/lib/workspace-events/no-activity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { dbReplica } from '@sim/db'
1+
import { db, dbReplica } from '@sim/db'
22
import { webhook, workflow, workflowDeploymentVersion, workflowExecutionLogs } from '@sim/db/schema'
33
import { createLogger } from '@sim/logger'
44
import { and, asc, eq, gt, gte, inArray, isNull, ne, or, sql } from 'drizzle-orm'
@@ -120,7 +120,7 @@ async function hasRecentActivity(
120120
): Promise<boolean> {
121121
const windowStart = new Date(Date.now() - config.inactivityHours * 60 * 60 * 1000)
122122

123-
const recentLogs = await dbReplica
123+
const recentLogs = await db
124124
.select({ id: workflowExecutionLogs.id })
125125
.from(workflowExecutionLogs)
126126
.where(

0 commit comments

Comments
 (0)