[Backgroundrb-devel] purpose of delayed persistent jobs

hemant gethemant at gmail.com
Sun Aug 17 17:14:48 EDT 2008


On Sun, Aug 17, 2008 at 7:43 PM, Todd Tyree <todd at snappl.co.uk> wrote:
>
> I've forked the main repository here:
>
> git://github.com/tatyree/backgroundrb.git
>
> and made a couple of changes to make the job_queue consume all outstanding
> jobs at once, which is what I understand Woody to be commenting on (and
> something I've needed for a while).
>
> I'm afraid I've got a conflict on the specs as I have a hard dependency on
> Rspec's internal mocks, and so I'm having some trouble making the specs run
> in my environment (mocha just causes everything to fall apart badly, which
> is ashame).  As a result, I'm afraid the level of testing is a little (OK,
> completely...it works for me) unsophisticated.  That said, I'm pretty new to
> Rspec, and am probably missing/misunderstanding something.
>
> I started to re-add the test for RAILS_ENV that KieranP removed ( Line 27 of
> bdrb_config.rb -  Object.const_set("RAILS_ENV",environment) unless
> defined?(RAILS_ENV) ) as bdrb complains on startup without it.  However, I'm
> not at all clear why he removed it so I decided to leave it alone.
>
> Hope I've done everything all right.  I'm new to Git and Rspec, but not new
> to development or Rails.

We can't add this, mainly because pulling all tasks out of queue at
once will essentially block the worker for a real long time. I do not
think, that will be a good idea, also if your worker is doing nothing
except running tasks from queue, you are essentially achieving the
same result(except for the part where worker is actually responding to
external events).

Thoughts?


PS: Good work, btw. Also, I am using test/spec not rspec there. ;)


More information about the Backgroundrb-devel mailing list