Uh oh!
There was an error while loading. Please reload this page.
Conversation
This provides a way to work off all the jobs in the queue and exit afterwards. Closes#191.
senny
commented
Mar 6, 2015
@smathieu@jipiboily thoughts? |
rwdaigle
commented
Mar 6, 2015
👍
|
smathieu
commented
Mar 6, 2015
I would expect a task named |
smathieu
commented
Mar 6, 2015
The code is fine, but I worry about how this project is evolving. QC was originally designed (as far as I understand) to have a simple and limited interface for workers. This would allow users of QC to create their own subclass of the worker class and override some method. It seems that over the year, the size of the worker interface has kept growing, making it less approachable to override. For instance, if someone overrode the Something to think about I guess. |
senny
commented
Mar 9, 2015
@smathieu I agree with everything you say. I also do think that this functionality should be part of the limited interface we provide. The PR was created to be fully backwards compatible but as you pointed out, this is a tradeoff in other areas. Depending on wether this lands in a major or minor we might have more flexibility to rework the internals. I'd like to see a more approachable interface as well. @jipiboily any thoughts on a roadmap? |
jipiboily
commented
Mar 11, 2015
I'm on the fence on that one. I don't have a strong opinion, but it doesn't feel like something that most people will use. The more I think about qc, the more I think it should keep a tight scope, stay easily approachable and modifiable. To achieve this, I think we should mostly add stuff that will be used by the majority of the people using qc. Are there any other use cases you can think of? The original one (using this on Heroku to avoid paying for a full dyno) seems like something very few people will do, and it's easy to work around it. |
jipiboily
commented
Mar 11, 2015
And by the way, my life changed a bit in the last couple months, you might have seen I don't have much time to work on qc or any open source stuff, and I don't think this will change anytime soon. Basically, don't wait for me if you want to be able to move at a decent pace :) |
senny
commented
Jan 15, 2016
I still feel we should put this in. Some use-cases I've came across where this would be very helpful.
|
jipiboily
commented
Jan 15, 2016
I don't have a strong opinion, so either way is fine IMHO. |
bronson
commented
Feb 5, 2016
This makes sense and has precedent: delayed_job has a Agreed, a cron job is a good example where this feature would be needed. Another would be spinning up an expensive host twice a day to drain the queue. I'd like to see this feature. That said, I agree with @smathieu... It's worth worrying if QC's internals are getting weirder. For example, in this PR, Is it OK to make minor changes to But maybe it's not OK... Since the docs recommend overriding Worker to manage connections (!), and nobody put any |
smathieu
commented
Feb 5, 2016
@senny has convinced me that this is valuable, but I'm still not convinced this interface is the right one. Maybe we can limit the scope of change by making the |
ukd1
commented
Jul 18, 2019
bronson
commented
Jul 26, 2019
I'm not in charge of any Rails projects anymore. Hope you can do it @ukd1! |
I'm not sure if Our Que specs use this helper: defrun_que_synchronouslyQue.run_synchronously=trueyieldensureQue.run_synchronously=falseendit"runs jobs inline without needing a worker"dorun_que_synchronouslydoJob.enqueue()OtherJob.enqueue()endend |
This provides a way to work off all the jobs in the queue
and exit afterwards.
Closes#191.