File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/tarkov-data-manager/jobs Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,18 @@ const jobManager = {
182182 await Promise . allSettled ( [ promise ] ) ;
183183 console . log ( 'Startup jobs complete' ) ;
184184 } ,
185+ abortJob : async ( jobName ) => {
186+ if ( ! jobs [ jobName ] ) {
187+ return Promise . reject ( new Error ( `${ jobName } is not a valid job` ) ) ;
188+ }
189+ if ( ! jobs [ jobName ] . running ) {
190+ return Promise . reject ( new Error ( `${ jobName } is not running` ) ) ;
191+ }
192+ return new Promise ( ( resolve ) => {
193+ emitter . once ( `jobComplete_${ jobName } ` , resolve ) ;
194+ jobs [ jobName ] . abortController . abort ( ) ;
195+ } ) ;
196+ } ,
185197 stop : ( ) => {
186198 return schedule . gracefulShutdown ( ) ;
187199 } ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import path from 'node:path';
33
44import DataJob from '../modules/data-job.mjs' ;
55
6- const historicalPriceDays = 7 ;
6+ const historicalPriceDays = 30 ;
77
88class UpdateHistoricalPricesJob extends DataJob {
99 constructor ( options ) {
You can’t perform that action at this time.
0 commit comments