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
Undefined/empty jobs #248
Comments
same here please help !!!!! |
Can you provide some code that reproduces the issue? |
Our team used Bull to solve the issue we had used a similar code snippet as mentioned in the first comment. Code couldn't be shown due to confidential information. |
you do not need to provide code that is confidential, just a test case that demonstrates the issue. Thing is, we have tests that cover this case and it works, so it must be something else that affects the results: |
I ran into a similar issue with the 'repeat' job type. I expected getJobs to return an array of jobs but, instead I got an array of 'undefined' which is weird. I wrote a test inside it('should return repeat jobs', async function(done) {
try {
await queue.add(
'test',
{ foo: 1 },
{
repeat: {
every: 15000,
},
},
);
const jobs = await queue.getJobs('repeat');
console.log(jobs);
expect(jobs[0]?.data?.foo).to.equal(1);
} catch (e) {
return done(e);
}
}); Anyway, I hope this issue gets resolved soon since I'd like more data than what the |
literally minutes after posting I realized that the job type I'm looking for is "delayed" not "repeat" smh. I'll leave my post in case any other google wanderers run into the same problem lol. |
I'm having the same exact issue. :( redis 6.2 |
OK nvm. I was wrongly using redis prefixes at the connection options... bull wasn't able to retrieve the jobs data.. |
I have a similar problem. I am getting an redis 7.0 |
@BohdanKov can you please create a minimal reproducible case and a new issue with the test code? |
|
I think it should be related to our new marker strategy for delayed jobs, there is an special id '0:${delay}', this value is added in wait list when the list is empty and delayed jobs are added, so the worker wakes up and it can know how much time has to wait until promote the delayed job. As this value is only used for this purpose, it is not related to any job info, so in getJobs function this value will be null |
And is there any workaround or fix for that? Thanks in advance |
having this issue as well, +1 |
Hey, we added this change to skip delayed markers 816376e some time ago, in case you are using a greater version than 3.1.3 a reproducible test case could help us to make a fix |
I am having a lot of failed jobs, but when I try to get them via:
They are returned as
undefined
. e.G.:As I can't get the job ID this way, I double checked which keys it is trying to get by setting
process.env.DEBUG = "ioredis:*";
. When I manually check one of the keys that returns anundefined
job via theredis-cli
I get an empty result:Any reason how this could happen or how I could investigate further?
The text was updated successfully, but these errors were encountered: