working on queue
This commit is contained in:
parent
58c5ba1200
commit
fe7733aeb5
5 changed files with 105 additions and 34 deletions
|
|
@ -110,7 +110,7 @@ async function processDirect<T>(
|
|||
): Promise<Omit<BatchResult, 'duration'>> {
|
||||
|
||||
const totalDelayMs = options.totalDelayHours * 60 * 60 * 1000;
|
||||
const delayPerItem = Math.floor(totalDelayMs / items.length);
|
||||
const delayPerItem = totalDelayMs / items.length;
|
||||
|
||||
logger.info('Creating direct jobs', {
|
||||
totalItems: items.length,
|
||||
|
|
@ -157,7 +157,7 @@ async function processBatched<T>(
|
|||
const batchSize = options.batchSize || 100;
|
||||
const batches = createBatches(items, batchSize);
|
||||
const totalDelayMs = options.totalDelayHours * 60 * 60 * 1000;
|
||||
const delayPerBatch = Math.floor(totalDelayMs / batches.length);
|
||||
const delayPerBatch = totalDelayMs / batches.length;
|
||||
|
||||
logger.info('Creating batch jobs', {
|
||||
totalItems: items.length,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue