screwdriver-queue-service 3.0.4 → 3.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-queue-service",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "Screwdriver Queue Service API",
5
5
  "main": "app.js",
6
6
  "directories": {
@@ -466,15 +466,6 @@ async function init(executor) {
466
466
  if (executor.multiWorker) return 'Scheduler running';
467
467
 
468
468
  const resqueConnection = { redis: executor.redis, namespace: queueNamespace };
469
- const retryOptions = {
470
- plugins: [Plugins.Retry],
471
- pluginOptions: {
472
- Retry: {
473
- retryLimit: RETRY_LIMIT,
474
- retryDelay: RETRY_DELAY
475
- }
476
- }
477
- };
478
469
  // Jobs object to register the worker with
479
470
  const jobs = {
480
471
  startDelayed: {
@@ -532,13 +523,22 @@ async function init(executor) {
532
523
  };
533
524
  }
534
525
 
535
- return await startPeriodic(executor, fullConfig);
526
+ await startPeriodic(executor, fullConfig);
536
527
  } catch (err) {
537
528
  logger.error(`err in startDelayed job: ${err}`);
538
529
  throw err;
539
530
  }
540
531
  },
541
- ...retryOptions
532
+ plugins: [Plugins.Retry, Plugins.JobLock, Plugins.DelayQueueLock, Plugins.QueueLock],
533
+ pluginOptions: {
534
+ JobLock: {
535
+ reEnqueue: false
536
+ },
537
+ Retry: {
538
+ retryLimit: RETRY_LIMIT,
539
+ retryDelay: RETRY_DELAY
540
+ }
541
+ }
542
542
  },
543
543
  startFrozen: {
544
544
  perform: async jobConfig => {
@@ -557,7 +557,13 @@ async function init(executor) {
557
557
  throw err;
558
558
  }
559
559
  },
560
- ...retryOptions
560
+ plugins: [Plugins.Retry],
561
+ pluginOptions: {
562
+ Retry: {
563
+ retryLimit: RETRY_LIMIT,
564
+ retryDelay: RETRY_DELAY
565
+ }
566
+ }
561
567
  }
562
568
  };
563
569