MCPcopy Index your code
hub / github.com/simstudioai/sim / releaseJobClaim

Function releaseJobClaim

apps/sim/lib/table/jobs/service.ts:164–170  ·  view source on GitHub ↗
(tableId: string, jobId: string)

Source from the content-addressed store, hash-verified

162 * newer run. A sync route claims, writes, then releases here in a `finally`.
163 */
164export async function releaseJobClaim(tableId: string, jobId: string): Promise<void> {
165 await db
166 .delete(tableJobs)
167 .where(
168 and(eq(tableJobs.id, jobId), eq(tableJobs.tableId, tableId), eq(tableJobs.status, 'running'))
169 )
170}
171
172/**
173 * Records job progress (rows processed so far) and bumps `updated_at` so the stale-job janitor

Callers 10

dispatchImportJobFunction · 0.90
dispatchDeleteJobFunction · 0.90
dispatchUpdateJobFunction · 0.90
executeFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 2

deleteMethod · 0.65
eqFunction · 0.50

Tested by

no test coverage detected