bull-board icon indicating copy to clipboard operation
bull-board copied to clipboard

Add new job from within bull-board?

Open melalj opened this issue 3 years ago • 14 comments

Thanks for developing and maintaining this tool.

Is there a way to trigger a queue right on bull-board?

melalj avatar May 04 '21 15:05 melalj

What do you mean by "trigger"?

felixmosh avatar May 04 '21 15:05 felixmosh

Add a task to a queue.

myQueue.add({ foo: 'bar' })

melalj avatar May 04 '21 15:05 melalj

Nope, It is not the responsibility of this lib.

You control your queues. There is not good reason to make it available from the UI (if you think differently please share your thoughts)

felixmosh avatar May 04 '21 16:05 felixmosh

@melalj it is possible in bull-monitor

s-r-x avatar May 05 '21 02:05 s-r-x

Nope, It is not the responsibility of this lib.

You control your queues. There is not good reason to make it available from the UI (if you think differently please share your thoughts)

I'm using bull-board to monitor all queues, some of them are triggered manually to sync a dataset for example. I made a workaround waiting to have it natively on bull-board:

triggerRouter.get('/:queueName', asyncHandler(async (req, res) => {
    const job = await context.queues[req.params.queueName].add(req.query || {}); // context.queues holds all queues instances
    return res.send({ jobId: job.id });
  }));

@melalj it is possible in bull-monitor

Well done @s-r-x, it's a fresh new project!

melalj avatar May 05 '21 13:05 melalj

@felixmosh how about the ability to replay a completed job in the same way you can retry a failed job. The action would just add a new job with the same data as the previous.

That makes a bit more sense in the context of this library.

Jivings avatar Aug 09 '21 12:08 Jivings

I don't think that it should be as part of "retrying" of completed job.

I don't see any good reason for a usage of such requirement, as I've mentioned above, bull-board is a view over the queue, it doesn't make sense to it to add new jobs (even though it is possible).

If there are many requests for it, we can add it.

felixmosh avatar Aug 09 '21 12:08 felixmosh

Just throwing in it would be nice to also be able to manually queue jobs using bull-board.

bull-board already supports promoting jobs, but being able to use it to also add jobs would really help tighten the debug loop when using this UI.

maclockard avatar Nov 05 '21 17:11 maclockard

We would also really appreciate this feature! Having the ability to add job to queues is extremely useful Here is my use case :

A sendEmail job failed in production due to incorrect payload. I have corrected the payload and would like to run the job with the fixed payload via bull-board

yannicktian avatar Jan 11 '22 17:01 yannicktian

@felixmosh how about the ability to replay a completed job in the same way you can retry a failed job. The action would just add a new job with the same data as the previous.

That makes a bit more sense in the context of this library.

+1 that this minimal change would be really helpful. Feels like it falls under the same scope as allowing retry of failed jobs.

apackin avatar Feb 24 '22 18:02 apackin

Nope, It is not the responsibility of this lib. You control your queues. There is not good reason to make it available from the UI (if you think differently please share your thoughts)

My thinking is that there is already job triggering functionality in place (eg. implemented as retrying failed jobs, promote repeatable cron jobs etc..) which requires the user to manually trigger the action... In our case, we often trigger cron jobs on demand when its needed, but sometimes we want to trigger a job only by hand and we never want to run it as cron job repeatedly. Maybe this could be solved by just enabling the user to trigger named job. There would be just input to provide job name to execute.

fogine avatar Apr 08 '22 13:04 fogine

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 07 '22 13:07 stale[bot]

@felixmosh you removed the "wontfix" label and added "enhancement". Does that mean that this feature can be picked up by somebody and potentially create a PR that will be merged?

snird avatar Nov 09 '23 23:11 snird

@snird yeap

felixmosh avatar Nov 10 '23 03:11 felixmosh