Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #903
Closed
Open
Issue created Apr 03, 2018 by Administrator@rootContributor

Globally paused queue cannot receive job (or not shown in Arena untill queue is globally resumed)

Created by: 11arn11

Description

I use Arena as a GUI

I have two workers and two queues

The worker of the first queue fills the second queue.

The second worker must start paused.

When the first worker finishes his queue, he has to resume the second one.

Now the problem...

If the second worker starts globally paused, Arena does not show the jobs added to the queue until the second queue is resumed

If the second worker starts locally paused, Arena will show the jobs added to this second queue, but the first worker will not be able to restart th second queue (according to the documentation)

how can I do?

Worker 1


const Queue = require('bull');

const queue_1_1 = new Queue('queue1');
const queue_1_2 = new Queue('queue2');

(async function () {

	await queue_1_1.pause();

	queue_1_1.process(function (job, done) {

		if (something) {
			queue_1_2.resume();
		}

		console.log(job.data);
		done();

	});

})();

Worker 2


const Queue = require('bull');

const queue_2_2 = new Queue('queue2');

(async function () {

	// pause globally
	// in this way, Arena will not show the jobs of queue 2 until queue 2 is resumed
	queue_2_2.pause();

	// paused locally
	// in this way I will not be able to restart the second queue externally
	// queue_2_2.pause(true);

	queue_2_2.process(function (job, done) {
		console.log(job.data);
		done();
	});

})();
Assignee
Assign to
Time tracking