Skip to content
Discussion options

You must be logged in to vote

No, you don't need to set removeOnComplete: true to use embedded mode properly. But understanding what it does helps you decide.

What removeOnComplete does

removeOnComplete: false (default)

When a job completes:

  1. Job stored in completedJobs set (max 50,000 entries, FIFO eviction)
  2. Full job data stored in completedJobsData map (max 50,000)
  3. Return value stored in jobResults LRU cache (max 10,000)
  4. Job marked as completed in SQLite
  5. Result written to SQLite results table

You can still query the job afterward:

const job = await queue.getJob(jobId);        // works
const result = await queue.getJobResult(jobId); // works
const state = await queue.getJobState(jobId);   // returns 'completed'

Memo…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arthurvanl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants