Skip to content

Commit ff9dd7a

Browse files
authored
fix: wrong initial value and lower processEvery for agenda-instance.js (#1131)
the initial value is probably just a type mistake that is there since the initial commit. the second one is actually a side effect of another bug that it is working currently, but processEvery has a default value of 5 seconds, therefore only every 5 seconds it is checked if there are new jobs available. The tests itself wait just for 400ms before sending back that the job didn't run..which was not even possible, because agenda could easily be still waiting for 5 seconds to be passed.
1 parent abfd348 commit ff9dd7a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/fixtures/agenda-instance.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const tests = process.argv.slice(3);
77
const agenda = new Agenda({
88
db: {
99
address: connStr
10-
}
10+
},
11+
processEvery: 100
1112
}, async() => {
1213
tests.forEach(test => {
1314
addTests[test](agenda);

test/job.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ describe('Job', () => {
11441144
const n = cp.fork(serverPath, [mongoCfg, 'daily-array']);
11451145

11461146
let ran1 = false;
1147-
let ran2 = true;
1147+
let ran2 = false;
11481148
let doneCalled = false;
11491149

11501150
const serviceError = function(e) {

0 commit comments

Comments
 (0)