Skip to content

Commit fe4023c

Browse files
committed
keep more historical price data
1 parent 3f82e16 commit fe4023c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/tarkov-data-manager/jobs/index.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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
},

src/tarkov-data-manager/jobs/update-historical-prices.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from 'node:path';
33

44
import DataJob from '../modules/data-job.mjs';
55

6-
const historicalPriceDays = 7;
6+
const historicalPriceDays = 30;
77

88
class UpdateHistoricalPricesJob extends DataJob {
99
constructor(options) {

0 commit comments

Comments
 (0)