Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjclark committed Sep 25, 2024
1 parent 75c6529 commit b98625c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/ws-worker/src/api/claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,15 @@ const claim = (
}
logger.debug(`requesting run (capacity ${activeWorkers}/${maxWorkers})`);

const start = Date.now()
const start = Date.now();
app.queueChannel
.push<ClaimPayload>(CLAIM, { demand: 1 })
.receive('ok', ({ runs }: ClaimReply) => {
const duration = Date.now() - start;
logger.debug(
`claimed ${runs.length} runs in ${duration}ms (${
runs.length ?
runs.map((r) => r.id).join(',')
: '-'
})`,
runs.length ? runs.map((r) => r.id).join(',') : '-'
})`
);
// TODO what if we get here after we've been cancelled?
// the events have already been claimed...
Expand Down

0 comments on commit b98625c

Please sign in to comment.