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

Redis is not flushing. Bull constantly adds new jobs and not delete them. #1693

Closed
wa1one opened this issue Apr 6, 2020 · 2 comments
Closed

Comments

@wa1one
Copy link

wa1one commented Apr 6, 2020

Description

Redis is not flushed. Bull constantly adds new jobs and not delete them. All bull jobs was completed.

Minimal, Working Test code to reproduce the issue.

binanceQ.add(
    'checktrade',
    { data: 'hello' },
    {
        repeat: {
            cron: '* * * * *'
        }
    }
);

binanceQ.process('checktrade', async (job, done) => {
    console.log('------------------------');
    console.log('Check trades', job.data);
    try {
        await tradesService.getTrades();
        await tradesService.runAllQueues();
        done(null);
    } catch (e) {
        console.error(e.message);
    }
});

Bull version

"bull": "^3.12.1"

Additional information

keys       mem      clients blocked requests            connections          
71187      90.08M   4       1       3149620 (+48)       206         
71188      90.08M   4       1       3149664 (+44)       206         
71189      90.08M   4       1       3149708 (+44)       206         
71190      90.08M   4       1       3149752 (+44)       206         
71191      90.08M   4       1       3149800 (+48)       206         
71192      90.08M   4       1       3149852 (+52)       206         
71193      90.08M   4       1       3149900 (+48)       206         
71194      90.09M   4       1       3149944 (+44)       206         
71195      90.09M   4       1       3149988 (+44)       206         
71196      90.09M   4       1       3150032 (+44)       206         
71197      90.09M   4       1       3150076 (+44)       206         
71201      90.09M   4       1       3150162 (+86)       206 

#840

@wa1one wa1one changed the title Redis is not flushed. Bull constantly adds new jobs and not delete them. Redis is not flushing. Bull constantly adds new jobs and not delete them. Apr 6, 2020
@adlion
Copy link

adlion commented Apr 6, 2020

bull has on option called removeOnComplete that you should add to the joboptions.
Also you can listen for event jobProcessor.on('complete', cb) where you can remove the job after being declared complete.

@wa1one
Copy link
Author

wa1one commented Apr 6, 2020

Thank you for reply. Closing...

@wa1one wa1one closed this as completed Apr 6, 2020
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

2 participants