File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,12 +36,6 @@ const pipeline = (cases) => {
3636 return redis . pipeline ( commands ) ;
3737} ;
3838
39- const storeCleanup = ( ) => {
40- debug ( 'store cleanup starting...' ) ;
41- cleanCasesWithPrefix ( 'case' ) ; // Cases via RESTful interface.
42- cleanCasesWithPrefix ( 'c' ) ; // Cases via socket interface.
43- } ;
44-
4539const cleanCasesWithPrefix = ( prefix ) => {
4640 getCasesWithActivities ( ( cases ) => {
4741 // scan returns the prefixed keys. Remove them since the redis client will add it back
@@ -56,6 +50,12 @@ const cleanCasesWithPrefix = (prefix) => {
5650 } , prefix ) ;
5751} ;
5852
53+ const storeCleanup = ( ) => {
54+ debug ( 'store cleanup starting...' ) ;
55+ cleanCasesWithPrefix ( 'case' ) ; // Cases via RESTful interface.
56+ cleanCasesWithPrefix ( 'c' ) ; // Cases via socket interface.
57+ } ;
58+
5959exports . start = ( crontab ) => {
6060 const isValid = cron . validate ( crontab ) ;
6161 if ( ! isValid ) throw new Error ( `invalid crontab: ${ crontab } ` ) ;
You can’t perform that action at this time.
0 commit comments