We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d97f27e commit 72d8a68Copy full SHA for 72d8a68
1 file changed
apps/sim/lib/core/workspace-dispatch/redis-store.ts
@@ -336,7 +336,11 @@ export class RedisWorkspaceDispatchStorage implements WorkspaceDispatchStorageAd
336
case WORKSPACE_DISPATCH_CLAIM_RESULTS.ADMITTED: {
337
const record = await this.getDispatchJobRecord(lua.jobId!)
338
if (!record) {
339
- throw new Error(`Claimed job ${lua.jobId} not found in store`)
+ await this.redis.zrem(workspaceLeaseKey(workspaceId), lua.leaseId!).catch(() => undefined)
340
+ logger.warn('Claimed job record expired before status update, lease released', {
341
+ jobId: lua.jobId,
342
+ })
343
+ return { type: WORKSPACE_DISPATCH_CLAIM_RESULTS.EMPTY }
344
}
345
346
const updatedRecord: WorkspaceDispatchJobRecord = {
0 commit comments