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

queue.getRepeatableJobs() not returning valid Repeatable Job configurations #2255

Closed
a-mitrovic-codefleet opened this issue Jan 14, 2022 · 2 comments

Comments

@a-mitrovic-codefleet
Copy link

a-mitrovic-codefleet commented Jan 14, 2022

Description

I added one repeatable job in my queue, but when I call queue.getRepeatableJobs(), it does not return correct informations (cron, tz, etc.).

Minimal, Working Test code to reproduce the issue.

updateStatisticsQueue.add(`statisticsType-1`, { statisticsType }, {
            attempts: 1200,
            backoff: 30000,
            removeOnComplete: true,
            repeat: {
                cron: '1 0 0 * * *',
                tz: 'UTC'
            }
        });

const repeatableJobs = await updateStatisticsQueue.getRepeatableJobs();

console.log(repeatableJobs);
//output:
[
  {
    key: 'statisticsType-1:1fa6a7b0-356d-44d4-9b69-fba587f9c00a:1::UTC:1 0 0 * * *',
    name: 'statisticsType-1',
    id: '1fa6a7b0-356d-44d4-9b69-fba587f9c00a',
    endDate: 1,
    tz: null,
    cron: 'UTC',
    every: null,
    next: 1642204801000
  }
]

Bull version

3.29.3

Additional information

Node v14.17.0

@manast
Copy link
Member

manast commented Jan 17, 2022

I tried this and could not reproduce it, furthermore, we have tests that cover this scenario and they are passing. Tested on version 4.2.1 but we had those same tests in 3.x too: https://github.com/OptimalBits/bull/blob/develop/test/test_repeat.js#L105

@stale
Copy link

stale bot commented Mar 18, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 18, 2022
@stale stale bot closed this as completed Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants