Comparing version 1.11.1 to 1.11.2
@@ -0,1 +1,8 @@ | ||
## [1.11.2](https://github.com/taskforcesh/bullmq/compare/v1.11.1...v1.11.2) (2020-12-15) | ||
### Bug Fixes | ||
* promote jobs to the right "list" when paused ([d3df615](https://github.com/taskforcesh/bullmq/commit/d3df615d37b1114c02eacb45f23643ee2f05374d)) | ||
## [1.11.1](https://github.com/taskforcesh/bullmq/compare/v1.11.0...v1.11.1) (2020-12-15) | ||
@@ -2,0 +9,0 @@ |
@@ -275,2 +275,3 @@ /** | ||
queue.keys.wait, | ||
queue.keys.paused, | ||
queue.keys.priority, | ||
@@ -277,0 +278,0 @@ queue.keys.events, |
@@ -261,2 +261,13 @@ /*eslint-env node */ | ||
}); | ||
mocha_1.it('should promote delayed job to the right queue if queue is paused', async () => { | ||
const normalJob = await queue.add('normal', { foo: 'bar' }); | ||
const delayedJob = await queue.add('delayed', { foo: 'bar' }, { delay: 1 }); | ||
await queue.pause(); | ||
await delayedJob.promote(); | ||
await queue.resume(); | ||
const waitingJobsCount = await queue.getWaitingCount(); | ||
chai_1.expect(waitingJobsCount).to.be.equal(2); | ||
const delayedJobsNewState = await delayedJob.getState(); | ||
chai_1.expect(delayedJobsNewState).to.be.equal('waiting'); | ||
}); | ||
}); | ||
@@ -263,0 +274,0 @@ // TODO: |
{ | ||
"name": "bullmq", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"description": "Queue for messages and jobs based on Redis", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -433,2 +433,3 @@ /** | ||
queue.keys.wait, | ||
queue.keys.paused, | ||
queue.keys.priority, | ||
@@ -435,0 +436,0 @@ queue.keys.events, |
@@ -341,2 +341,20 @@ /*eslint-env node */ | ||
}); | ||
it('should promote delayed job to the right queue if queue is paused', async () => { | ||
const normalJob = await queue.add('normal', { foo: 'bar' }); | ||
const delayedJob = await queue.add( | ||
'delayed', | ||
{ foo: 'bar' }, | ||
{ delay: 1 }, | ||
); | ||
await queue.pause(); | ||
await delayedJob.promote(); | ||
await queue.resume(); | ||
const waitingJobsCount = await queue.getWaitingCount(); | ||
expect(waitingJobsCount).to.be.equal(2); | ||
const delayedJobsNewState = await delayedJob.getState(); | ||
expect(delayedJobsNewState).to.be.equal('waiting'); | ||
}); | ||
}); | ||
@@ -343,0 +361,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1091721
17839