thing im pretty much done with extracting the queue and making it reususable, maybe just a few more change to be able to making the batch names a bit more specific

This commit is contained in:
Boki 2025-06-14 18:22:28 -04:00
parent ad5e353ec3
commit e8c90532d5
14 changed files with 117 additions and 93 deletions

View file

@ -30,7 +30,7 @@ async function testSimplifiedAPI() {
// Test 1: Simple array of numbers
const numbers = [1, 2, 3, 4, 5];
const result1 = await processItems(numbers, queueManager, {
totalDelayMs: 5000,
totalDelayHours: 0.0014, // ~5 seconds (5/3600 hours)
useBatching: false,
provider: 'test-provider',
operation: 'process-item',
@ -46,7 +46,7 @@ async function testSimplifiedAPI() {
];
const result2 = await processItems(objects, queueManager, {
totalDelayMs: 5000,
totalDelayHours: 0.0014, // ~5 seconds
useBatching: true,
batchSize: 2,
provider: 'test-provider',
@ -59,7 +59,7 @@ async function testSimplifiedAPI() {
const symbols = Array.from({ length: 1000 }, (_, i) => `Symbol-${i + 1}`);
console.log('📋 Testing with symbols...');
const result3 = await processItems(symbols, queueManager, {
totalDelayMs: 3000,
totalDelayHours: 0.0008, // ~3 seconds
useBatching: true,
batchSize: 1,
provider: 'test-provider',