This repository was archived by the owner on Aug 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +5148
-4
lines changed Expand file tree Collapse file tree 5 files changed +5148
-4
lines changed Original file line number Diff line number Diff line change 54
54
"winston" : " ^3.2.1"
55
55
},
56
56
"devDependencies" : {
57
+ "@types/agenda" : " ^2.0.4" ,
57
58
"@types/express" : " ^4.16.0" ,
58
59
"@types/jest" : " ^23.3.8" ,
59
60
"@types/lodash" : " ^4.14.118" ,
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default {
39
39
agenda : {
40
40
dbCollection : process . env . AGENDA_DB_COLLECTION ,
41
41
pooltime : process . env . AGENDA_POOL_TIME ,
42
- concurrency : process . env . AGENDA_CONCURRENCY ,
42
+ concurrency : parseInt ( process . env . AGENDA_CONCURRENCY , 10 ) ,
43
43
} ,
44
44
45
45
/**
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import config from '../config';
4
4
export default ( { mongoConnection } ) => {
5
5
return new Agenda ( {
6
6
mongo : mongoConnection ,
7
- collection : config . agenda . dbCollection ,
7
+ db : { collection : config . agenda . dbCollection } ,
8
8
processEvery : config . agenda . pooltime ,
9
9
maxConcurrency : config . agenda . concurrency ,
10
- } ) as any ;
10
+ } ) ;
11
11
/**
12
12
* This voodoo magic is proper from agenda.js so I'm not gonna explain too much here.
13
13
* https://github.com/agenda/agenda#mongomongoclientinstance
Original file line number Diff line number Diff line change 1
1
import config from '../config' ;
2
2
import EmailSequenceJob from '../jobs/emailSequence' ;
3
+ import Agenda from 'agenda' ;
3
4
4
- export default ( { agenda } ) => {
5
+ export default ( { agenda } : { agenda : Agenda } ) => {
5
6
agenda . define (
6
7
'send-email' ,
7
8
{ priority : 'high' , concurrency : config . agenda . concurrency } ,
You can’t perform that action at this time.
0 commit comments