Hangfire icon indicating copy to clipboard operation
Hangfire copied to clipboard

Dashboard: allow to choose which server runs a job

Open gldfdp opened this issue 7 years ago • 5 comments

When we have mulitple servers running it would be nice to be able to choose on wich server we want the job to be triggered (when we use the dashboard).

Indeed sometimes we need to debug a job by linking the debuger to a specific server but it is useless when it is not this server that is used to perform the job.

Thanks

gldfdp avatar Apr 05 '17 09:04 gldfdp

What about creating a queue per server and control it that way.

burningice2866 avatar Apr 05 '17 10:04 burningice2866

The problem with this is that queues are static... I'd like to dynamically be able to create queues and assign them to servers.

dcorbett-radian avatar Apr 05 '17 10:04 dcorbett-radian

The total sum of queues is not static, only what queues a specific server can fetch jobs from. So based on your description, every time you register a server you define that it should fetch jobs from the queue named after the server-name and that would allow you to choose at job-creation time what server it should run on.

I don't see why you would need to change the queues the server fetches jobs from at runtime to accomplish your described problem.

burningice2866 avatar Apr 05 '17 11:04 burningice2866

For what I know, for a specific job we can not change the assigned queue via the UI so it useless to debug a job that is in error in another queue.

gldfdp avatar Apr 05 '17 11:04 gldfdp

I'd love to see this feature too. Use case: 1 - I changed the way a job works on my local environment and I want to test it. 2 - I run the local env, go to handfire dashboard, run the job, I want the job to un on local server to TEST the code changes. 3 - Unfortunately the job is run on production, so the local code is not tested.

This would be usefully also for debugging, if I want to debug something with a breakpoint I need to run the job on the debugging environment, while right now I cannot control easily where the job runs.

I think you should change the title of the topic though, as "Dashboard" only is very generic. I may suggest something like "Dashboard: allow to choose which server runs a job"

jpinto3488 avatar Oct 11 '23 08:10 jpinto3488