@okf/ootils 1.6.9 → 1.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/universal.js CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/universal.ts
21
21
  var universal_exports = {};
22
22
  __export(universal_exports, {
23
+ BASE_BULLMQ_CONFIG: () => BASE_BULLMQ_CONFIG,
23
24
  deleteVal: () => deleteVal,
24
25
  extractAllBlocksFromTpl: () => extractAllBlocksFromTpl,
25
26
  genTagId: () => genTagId,
@@ -304,8 +305,249 @@ var _extractBlocksFromSomeBuilders = ({
304
305
  allBlocksAry.push(...inputBlockConfigsToPush);
305
306
  }
306
307
  };
308
+
309
+ // src/bullmq/GLOBAL_BULLMQ_CONFIG.js
310
+ var BASE_BULLMQ_CONFIG = {
311
+ PLUGIN__MAD_USERS_SYNC_QUEUE: {
312
+ id: "plugin--mad-users-sync-queue",
313
+ queueConfig: {
314
+ defaultJobOptions: {
315
+ backoff: {
316
+ type: "exponential",
317
+ delay: 2e3
318
+ },
319
+ attempts: 3,
320
+ removeOnComplete: 30,
321
+ removeOnFail: 100
322
+ },
323
+ streams: {
324
+ events: {
325
+ maxLen: 10
326
+ // Keep very low, cuz we dont really use historical stream events as of now
327
+ }
328
+ }
329
+ },
330
+ workerConfig: {
331
+ concurrency: 1,
332
+ // Process jobs one at a time to avoid race conditions
333
+ limiter: {
334
+ max: 5,
335
+ // Max 10 jobs per...
336
+ duration: 6e4
337
+ // ...60 seconds (rate limiting)
338
+ }
339
+ }
340
+ },
341
+ // Chunk Processing Queue
342
+ CREATE_CHUNKS_QUEUE: {
343
+ id: "create-chunks-queue",
344
+ queueConfig: {
345
+ defaultJobOptions: {
346
+ backoff: {
347
+ type: "exponential",
348
+ delay: 2e3
349
+ },
350
+ attempts: 3,
351
+ removeOnComplete: 30,
352
+ removeOnFail: 100
353
+ },
354
+ streams: {
355
+ events: {
356
+ maxLen: 10
357
+ // Keep very low, cuz we dont really use historical stream events as of now
358
+ }
359
+ }
360
+ },
361
+ workerConfig: {
362
+ concurrency: 10,
363
+ // Process 10 jobs at once for chunk processing
364
+ limiter: {
365
+ max: 100,
366
+ // Max 5 jobs per...
367
+ duration: 6e4
368
+ // ...60 seconds (higher throughput for chunking)
369
+ }
370
+ }
371
+ },
372
+ CREATE_ANNOS_QUEUE: {
373
+ id: "create-annos-queue",
374
+ queueConfig: {
375
+ defaultJobOptions: {
376
+ backoff: {
377
+ type: "exponential",
378
+ delay: 2e3
379
+ },
380
+ attempts: 3,
381
+ removeOnComplete: 30,
382
+ removeOnFail: 100
383
+ },
384
+ streams: {
385
+ events: {
386
+ maxLen: 10
387
+ // Keep very low, cuz we dont really use historical stream events as of now
388
+ }
389
+ }
390
+ },
391
+ workerConfig: {
392
+ concurrency: 10,
393
+ // Process 10 jobs at once for chunk processing
394
+ limiter: {
395
+ max: 100,
396
+ // Max 50 jobs per...
397
+ duration: 6e4
398
+ // ...60 seconds (higher throughput for chunking)
399
+ }
400
+ }
401
+ },
402
+ CONTENT_ENHANCE_AND_EMBED_QUEUE: {
403
+ id: "content-enhance-and-embed-queue",
404
+ queueConfig: {
405
+ defaultJobOptions: {
406
+ backoff: {
407
+ type: "exponential",
408
+ delay: 2e3
409
+ },
410
+ attempts: 3,
411
+ removeOnComplete: 30,
412
+ removeOnFail: 100
413
+ },
414
+ streams: {
415
+ events: {
416
+ maxLen: 10
417
+ // Keep very low, cuz we dont really use historical stream events as of now
418
+ }
419
+ }
420
+ },
421
+ workerConfig: {
422
+ concurrency: 1,
423
+ limiter: {
424
+ max: 100,
425
+ // Max 50 jobs per...
426
+ duration: 6e4
427
+ // ...60 seconds (higher throughput for chunking)
428
+ }
429
+ }
430
+ },
431
+ DIRECT_DATA_IMPORT_QUEUE: {
432
+ id: "direct-data-import-queue",
433
+ queueConfig: {
434
+ defaultJobOptions: {
435
+ backoff: {
436
+ type: "exponential",
437
+ delay: 2e3
438
+ },
439
+ attempts: 3,
440
+ removeOnComplete: 30,
441
+ removeOnFail: 100
442
+ },
443
+ streams: {
444
+ events: {
445
+ maxLen: 10
446
+ // Keep very low, cuz we dont really use historical stream events as of now
447
+ }
448
+ }
449
+ },
450
+ workerConfig: {
451
+ concurrency: 1,
452
+ limiter: {
453
+ max: 5,
454
+ // Max 5 jobs per...
455
+ duration: 6e4
456
+ // ...60 seconds (higher throughput for chunking)
457
+ }
458
+ }
459
+ },
460
+ AI_CATEGORIZE_QUEUE: {
461
+ id: "ai-categorize-queue",
462
+ queueConfig: {
463
+ defaultJobOptions: {
464
+ attempts: 3,
465
+ backoff: {
466
+ type: "exponential",
467
+ delay: 2e3
468
+ },
469
+ removeOnComplete: 30,
470
+ removeOnFail: 100
471
+ },
472
+ streams: {
473
+ events: {
474
+ maxLen: 10
475
+ // Keep very low, cuz we dont really use historical stream events as of now
476
+ }
477
+ }
478
+ },
479
+ workerConfig: {
480
+ concurrency: 1,
481
+ limiter: {
482
+ max: 100,
483
+ // (lets always keep this same as content enhance & embed since it comes immediately after)
484
+ duration: 6e4
485
+ // ...60 seconds (higher throughput for chunking)
486
+ }
487
+ }
488
+ },
489
+ ANNOS_ELASTIC_SYNC_QUEUE: {
490
+ id: "annos-elastic-sync-queue",
491
+ queueConfig: {
492
+ defaultJobOptions: {
493
+ attempts: 3,
494
+ backoff: {
495
+ type: "exponential",
496
+ delay: 2e3
497
+ },
498
+ removeOnComplete: 30,
499
+ removeOnFail: 100
500
+ },
501
+ streams: {
502
+ events: {
503
+ maxLen: 10
504
+ // Keep very low, cuz we dont really use historical stream events as of now
505
+ }
506
+ }
507
+ },
508
+ workerConfig: {
509
+ concurrency: 5,
510
+ limiter: {
511
+ max: 100,
512
+ // (lets always keep this same as content enhance & embed since it comes immediately after)
513
+ duration: 6e4
514
+ // ...60 seconds (higher throughput for chunking)
515
+ }
516
+ }
517
+ },
518
+ CHUNKS_ELASTIC_SYNC_QUEUE: {
519
+ id: "chunks-elastic-sync-queue",
520
+ queueConfig: {
521
+ defaultJobOptions: {
522
+ attempts: 3,
523
+ backoff: {
524
+ type: "exponential",
525
+ delay: 2e3
526
+ },
527
+ removeOnComplete: 30,
528
+ removeOnFail: 100
529
+ },
530
+ streams: {
531
+ events: {
532
+ maxLen: 10
533
+ // Keep very low, cuz we dont really use historical stream events as of now
534
+ }
535
+ }
536
+ },
537
+ workerConfig: {
538
+ concurrency: 5,
539
+ limiter: {
540
+ max: 100,
541
+ // (lets always keep this same as content enhance & embed since it comes immediately after)
542
+ duration: 6e4
543
+ // ...60 seconds (higher throughput for chunking)
544
+ }
545
+ }
546
+ }
547
+ };
307
548
  // Annotate the CommonJS export names for ESM import in node:
308
549
  0 && (module.exports = {
550
+ BASE_BULLMQ_CONFIG,
309
551
  deleteVal,
310
552
  extractAllBlocksFromTpl,
311
553
  genTagId,
@@ -272,7 +272,248 @@ var _extractBlocksFromSomeBuilders = ({
272
272
  allBlocksAry.push(...inputBlockConfigsToPush);
273
273
  }
274
274
  };
275
+
276
+ // src/bullmq/GLOBAL_BULLMQ_CONFIG.js
277
+ var BASE_BULLMQ_CONFIG = {
278
+ PLUGIN__MAD_USERS_SYNC_QUEUE: {
279
+ id: "plugin--mad-users-sync-queue",
280
+ queueConfig: {
281
+ defaultJobOptions: {
282
+ backoff: {
283
+ type: "exponential",
284
+ delay: 2e3
285
+ },
286
+ attempts: 3,
287
+ removeOnComplete: 30,
288
+ removeOnFail: 100
289
+ },
290
+ streams: {
291
+ events: {
292
+ maxLen: 10
293
+ // Keep very low, cuz we dont really use historical stream events as of now
294
+ }
295
+ }
296
+ },
297
+ workerConfig: {
298
+ concurrency: 1,
299
+ // Process jobs one at a time to avoid race conditions
300
+ limiter: {
301
+ max: 5,
302
+ // Max 10 jobs per...
303
+ duration: 6e4
304
+ // ...60 seconds (rate limiting)
305
+ }
306
+ }
307
+ },
308
+ // Chunk Processing Queue
309
+ CREATE_CHUNKS_QUEUE: {
310
+ id: "create-chunks-queue",
311
+ queueConfig: {
312
+ defaultJobOptions: {
313
+ backoff: {
314
+ type: "exponential",
315
+ delay: 2e3
316
+ },
317
+ attempts: 3,
318
+ removeOnComplete: 30,
319
+ removeOnFail: 100
320
+ },
321
+ streams: {
322
+ events: {
323
+ maxLen: 10
324
+ // Keep very low, cuz we dont really use historical stream events as of now
325
+ }
326
+ }
327
+ },
328
+ workerConfig: {
329
+ concurrency: 10,
330
+ // Process 10 jobs at once for chunk processing
331
+ limiter: {
332
+ max: 100,
333
+ // Max 5 jobs per...
334
+ duration: 6e4
335
+ // ...60 seconds (higher throughput for chunking)
336
+ }
337
+ }
338
+ },
339
+ CREATE_ANNOS_QUEUE: {
340
+ id: "create-annos-queue",
341
+ queueConfig: {
342
+ defaultJobOptions: {
343
+ backoff: {
344
+ type: "exponential",
345
+ delay: 2e3
346
+ },
347
+ attempts: 3,
348
+ removeOnComplete: 30,
349
+ removeOnFail: 100
350
+ },
351
+ streams: {
352
+ events: {
353
+ maxLen: 10
354
+ // Keep very low, cuz we dont really use historical stream events as of now
355
+ }
356
+ }
357
+ },
358
+ workerConfig: {
359
+ concurrency: 10,
360
+ // Process 10 jobs at once for chunk processing
361
+ limiter: {
362
+ max: 100,
363
+ // Max 50 jobs per...
364
+ duration: 6e4
365
+ // ...60 seconds (higher throughput for chunking)
366
+ }
367
+ }
368
+ },
369
+ CONTENT_ENHANCE_AND_EMBED_QUEUE: {
370
+ id: "content-enhance-and-embed-queue",
371
+ queueConfig: {
372
+ defaultJobOptions: {
373
+ backoff: {
374
+ type: "exponential",
375
+ delay: 2e3
376
+ },
377
+ attempts: 3,
378
+ removeOnComplete: 30,
379
+ removeOnFail: 100
380
+ },
381
+ streams: {
382
+ events: {
383
+ maxLen: 10
384
+ // Keep very low, cuz we dont really use historical stream events as of now
385
+ }
386
+ }
387
+ },
388
+ workerConfig: {
389
+ concurrency: 1,
390
+ limiter: {
391
+ max: 100,
392
+ // Max 50 jobs per...
393
+ duration: 6e4
394
+ // ...60 seconds (higher throughput for chunking)
395
+ }
396
+ }
397
+ },
398
+ DIRECT_DATA_IMPORT_QUEUE: {
399
+ id: "direct-data-import-queue",
400
+ queueConfig: {
401
+ defaultJobOptions: {
402
+ backoff: {
403
+ type: "exponential",
404
+ delay: 2e3
405
+ },
406
+ attempts: 3,
407
+ removeOnComplete: 30,
408
+ removeOnFail: 100
409
+ },
410
+ streams: {
411
+ events: {
412
+ maxLen: 10
413
+ // Keep very low, cuz we dont really use historical stream events as of now
414
+ }
415
+ }
416
+ },
417
+ workerConfig: {
418
+ concurrency: 1,
419
+ limiter: {
420
+ max: 5,
421
+ // Max 5 jobs per...
422
+ duration: 6e4
423
+ // ...60 seconds (higher throughput for chunking)
424
+ }
425
+ }
426
+ },
427
+ AI_CATEGORIZE_QUEUE: {
428
+ id: "ai-categorize-queue",
429
+ queueConfig: {
430
+ defaultJobOptions: {
431
+ attempts: 3,
432
+ backoff: {
433
+ type: "exponential",
434
+ delay: 2e3
435
+ },
436
+ removeOnComplete: 30,
437
+ removeOnFail: 100
438
+ },
439
+ streams: {
440
+ events: {
441
+ maxLen: 10
442
+ // Keep very low, cuz we dont really use historical stream events as of now
443
+ }
444
+ }
445
+ },
446
+ workerConfig: {
447
+ concurrency: 1,
448
+ limiter: {
449
+ max: 100,
450
+ // (lets always keep this same as content enhance & embed since it comes immediately after)
451
+ duration: 6e4
452
+ // ...60 seconds (higher throughput for chunking)
453
+ }
454
+ }
455
+ },
456
+ ANNOS_ELASTIC_SYNC_QUEUE: {
457
+ id: "annos-elastic-sync-queue",
458
+ queueConfig: {
459
+ defaultJobOptions: {
460
+ attempts: 3,
461
+ backoff: {
462
+ type: "exponential",
463
+ delay: 2e3
464
+ },
465
+ removeOnComplete: 30,
466
+ removeOnFail: 100
467
+ },
468
+ streams: {
469
+ events: {
470
+ maxLen: 10
471
+ // Keep very low, cuz we dont really use historical stream events as of now
472
+ }
473
+ }
474
+ },
475
+ workerConfig: {
476
+ concurrency: 5,
477
+ limiter: {
478
+ max: 100,
479
+ // (lets always keep this same as content enhance & embed since it comes immediately after)
480
+ duration: 6e4
481
+ // ...60 seconds (higher throughput for chunking)
482
+ }
483
+ }
484
+ },
485
+ CHUNKS_ELASTIC_SYNC_QUEUE: {
486
+ id: "chunks-elastic-sync-queue",
487
+ queueConfig: {
488
+ defaultJobOptions: {
489
+ attempts: 3,
490
+ backoff: {
491
+ type: "exponential",
492
+ delay: 2e3
493
+ },
494
+ removeOnComplete: 30,
495
+ removeOnFail: 100
496
+ },
497
+ streams: {
498
+ events: {
499
+ maxLen: 10
500
+ // Keep very low, cuz we dont really use historical stream events as of now
501
+ }
502
+ }
503
+ },
504
+ workerConfig: {
505
+ concurrency: 5,
506
+ limiter: {
507
+ max: 100,
508
+ // (lets always keep this same as content enhance & embed since it comes immediately after)
509
+ duration: 6e4
510
+ // ...60 seconds (higher throughput for chunking)
511
+ }
512
+ }
513
+ }
514
+ };
275
515
  export {
516
+ BASE_BULLMQ_CONFIG,
276
517
  deleteVal,
277
518
  extractAllBlocksFromTpl,
278
519
  genTagId,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.9",
6
+ "version": "1.6.11",
7
7
  "description": "Utility functions for both browser and Node.js",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.mjs",