Recall & Review
beginner
What does the
delay option do in a NestJS job?The
delay option sets a time in milliseconds to wait before the job starts processing. It schedules the job to run after the delay period.Click to reveal answer
beginner
How does the
attempts option affect job processing in NestJS?The
attempts option defines how many times a job will retry if it fails. This helps handle temporary errors by retrying automatically.Click to reveal answer
beginner
What is the purpose of the
priority option in NestJS jobs?The
priority option sets the job's importance level. Jobs with higher priority run before lower priority ones, helping manage urgent tasks first.Click to reveal answer
intermediate
How would you set a job to retry 5 times with a 10-second delay before starting in NestJS?
You set
attempts: 5 and delay: 10000 (milliseconds) in the job options when adding the job.Click to reveal answer
intermediate
Why is setting job priority useful in a queue system?
Priority helps the system decide which jobs to run first, so urgent or important tasks don't wait behind less important ones. This improves efficiency and user experience.
Click to reveal answer
What does the
delay option specify in a NestJS job?✗ Incorrect
The
delay option sets how long to wait before the job starts processing.If a job fails, which option controls how many times it will retry?
✗ Incorrect
The
attempts option defines the number of retry tries for a failed job.Which job option helps run urgent jobs before others?
✗ Incorrect
The
priority option sets the job's importance to run urgent jobs first.How do you specify a 5-second delay before a job starts?
✗ Incorrect
Delay is set in milliseconds, so 5000 means 5 seconds.
What happens if you set
attempts to 1?✗ Incorrect
Setting
attempts: 1 means only one attempt total; the job will never retry on failure.Explain how the
delay, attempts, and priority options work together in NestJS job processing.Think about scheduling, retrying, and ordering jobs.
You got /3 concepts.
Describe a real-life scenario where you would use job priority and delay options in a NestJS queue.
Imagine managing tasks with different urgency and timing.
You got /3 concepts.