Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better queue management #272

Open
vickyRathee opened this issue Apr 2, 2020 · 2 comments
Open

Better queue management #272

vickyRathee opened this issue Apr 2, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@vickyRathee
Copy link

I see you are working on new query the status API. Can we use that to get how many jobs in queue and cancel the job?

  1. I am using express API and don't want to queue the job if there are more then 10 (n) jobs already in queue. So better to throw error, instead gateway timeout.
  2. In another case, if I queued a job and it didn't completed in 60 (n) seconds. Can I cancel it using this new API? I see the job is still running on backend while http client timed out. Because HTTP client is disconnected with express timeout (502 - gateway timeout) error after 30-60 seconds and it's doesn't make sense to complete that job until I am using a database to store the result of job.
  3. Can I get the jobId when running cluster.execute() or cluster.queue() to store the result in database when job is completed.
@thomasdondorf
Copy link
Owner

1+2 -> Yes, the idea is to support these use cases.

3 -> This can already be done right now. Just pass the extra information (job id) as data to the job.

@thomasdondorf thomasdondorf changed the title Express support in 1.0 Better queue management Apr 19, 2020
@thomasdondorf thomasdondorf added the enhancement New feature or request label Apr 19, 2020
@vickyRathee
Copy link
Author

Thanks, I got the #3 working. Waiting for better queue management API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants