fixed error and made batch timings a little more dynamic depending on batch total instead of 15 min spread
This commit is contained in:
parent
b2817656b3
commit
8a588816c4
3 changed files with 47 additions and 51 deletions
|
|
@ -60,7 +60,13 @@ export const proxyProvider: ProviderConfig = {
|
|||
// Process a batch of proxies - uses the fetch-and-check JobNamePrefix process-(proxy)-batch
|
||||
const { queueManager } = await import('../services/queue.service');
|
||||
const batchProcessor = new BatchProcessor(queueManager);
|
||||
return await batchProcessor.processBatch(payload);
|
||||
return await batchProcessor.processBatch(
|
||||
payload,
|
||||
(proxy: ProxyInfo) => ({
|
||||
proxy,
|
||||
source: payload.config?.source || 'batch-processing'
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
'check-proxy': async (payload: {
|
||||
|
|
@ -123,6 +129,7 @@ export const proxyProvider: ProviderConfig = {
|
|||
type: 'proxy-maintenance',
|
||||
operation: 'fetch-and-check',
|
||||
payload: {},
|
||||
// should remove and just run at the same time so app restarts dont keeping adding same jobs
|
||||
cronPattern: getEvery24HourCron(),
|
||||
priority: 5,
|
||||
immediately: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue