MCPcopy Create free account
hub / github.com/simstudioai/sim / markJobCanceled

Function markJobCanceled

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

Source from the content-addressed store, hash-verified

373 * place (no rollback). Returns whether a running job was actually canceled.
374 */
375export async function markJobCanceled(tableId: string, jobId: string): Promise<boolean> {
376 const now = new Date()
377 const updated = await db
378 .update(tableJobs)
379 .set({ status: 'canceled', completedAt: now, updatedAt: now })
380 .where(ownsActiveJob(tableId, jobId))
381 .returning({ id: tableJobs.id })
382 return updated.length > 0
383}

Callers 1

route.tsFile · 0.90

Calls 2

ownsActiveJobFunction · 0.85
setMethod · 0.65

Tested by

no test coverage detected