Closed contentfree closed 9 years ago
Yes, I've certainly thought about this being a nice feature to have. It's a natural convenience on top of .async
https://github.com/nesquena/backburner#simple-async-jobs.
How applicable is the strategy that DJ is using? I assume that Backburner wouldn't want to pollute the object space as DJ does, but maybe there's a happy medium. Maybe have a static method on the Performable module that could take a class and a method name and create a proxy?
Yep that's the approach I was thinking too. Wouldn't be too much work. In short, add it to Performable and then just automagically rewrite the method to call async on the original method.
Another thing that DJ does that BB will probably have a differing opinion on is that the instance and the arguments get serialized themselves. From BB's examples it looks like they all use IDs which is great when you're designing for async out of the gate, but might be a problem when doing automagic behaviour. I haven't looked closely enough but does BB serialize instances if it runs across them? (It's not hugely efficient to do so, of course, but might be necessary here)
I'm thinking that this would be how it works (see the last test): https://gist.github.com/b310d568689ac66ac190. Basically a straight rip of DJ.
Thoughts on this?
@nesquena : Have you had a chance to evaluate the above?
I created a pull request for this: https://github.com/nesquena/backburner/pull/98
You've been doing a great job here, I like the changes you've been making to backburner. Can you make sure to add to the README to reflect each feature you add. I will pull in all your changes and cut a new release soon. Would you be interested in being a core contributor, I certainly need help keeping backburner going.
Happy to help. Do you want me to redo those or just add another commit after they're pulled in?
On Aug 30, 2015, at 10:34, Nathan Esquenazi notifications@github.com wrote:
You've been doing a great job here, I like the changes you've been making to backburner. Can you make sure to add to the README to reflect each feature you add. I will pull in all your changes and cut a new release soon. Would you be interested in being a core contributor, I certainly need help keeping backburner going.
— Reply to this email directly or view it on GitHub.
However you want to do it. You could add all the new features into the readme in a separate pull request or you could push a new commit to the existing branches. Whatever is easiest for you.
Done. Updated each branch separately and updated the Pull Requests.
This is closed once #100 is merged in
This is one of the nicest features of DelayedJob. It's very useful to not have to think about the seams of where you need async work to be done, instead being able to configure those in the production environment with #handle_asynchronously.
The method allows for configuring queue properties as well (name, priority, etc).