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

get status of the job #875

Closed
majidsajadi opened this issue Nov 14, 2021 · 3 comments
Closed

get status of the job #875

majidsajadi opened this issue Nov 14, 2021 · 3 comments

Comments

@majidsajadi
Copy link
Contributor

Hi

I have a question. is there any other way to get the status of a job other than getStatus method?

for example, I want to fetch all jobs but there is no property that shows the status of the job other than looping through all jobs and calling the async method getStatus which may cause performance issues. isn't there any better way to get this field? for example a getter?

@ccollie
Copy link
Contributor

ccollie commented Nov 14, 2021

There's no getter, unfortunately. My attempt at doing this is something like the following in lua

https://github.com/ccollie/toro-api/blob/outliers/src/server/commands/getJobState-7.lua

For multiple jobs, you can do this in a pipeline. I'd still be cautious about handling too many jobs in the same call though.

@ccollie
Copy link
Contributor

ccollie commented Nov 14, 2021

Some clarification: bull has similar code that's used by getStatus, so you can use that, but for your use-case the important thing is to bypass the getStatus call and pipeline calls using the redis client directly.

@manast manast closed this as completed Nov 16, 2021
@manast
Copy link
Contributor

manast commented Nov 16, 2021

Closing since we have no plans to implement this feature in BullMQ right now.

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

No branches or pull requests

3 participants