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
takeLock(), ReleaseLock() functionality #108
Comments
Hi @adikaladik
@QueueProcess({ name: 'integration' })
async execute(job: Job<number>, callback: DoneCallback) {
await job.takeLock();
this.logger.log(` start processing : ${job.id}`);
this.userIntegrationService.processUserIntegrations(job.data).then(async (result) => {
await job.releaseLock();
callback(null, result);
});
} |
Hi, @fwoelffel are there any possible options which cause an error? When I added await to those calls new error happened:
|
Hi @adikaladik 👋 |
Since I'm going to use a lot of job consumers which will work in parallel I found job has to methods:
Why I try to use that in my code, job fails with an erorr: '["Error: Missing lock for job 4 finished'
Maybe I have a wrong understanding of that functuinality, but could someone advice what I do worng? Thanks!
The text was updated successfully, but these errors were encountered: