[Rails] Re: Database Concurrency Without a Web Server?

Don Stocks
Thu, 13 Jul 2006 15:58:16 -0000

Francis Cianfrocca wrote:

> Ok, I implemented it. I''ll send you a new EventMachine gem to your
> private email, and if it works for you, I''ll cut a new public
release
> (will be version 0.6.0).
>
> In your particular case you have no code that has to process the result
> of job.save, so your callback can be empty. Your new code would look
> like this:
>
> EventMachine.add_timer(delay){
>     job.run
>     EventMachine.defer proc {job.save}
> }
>
> If you had had a callback you wanted to execute after job.save
> completes, you would have added it as a second proc argument to the
> #defer call.

Man, that was fast!  Overnight delivery to the west coast! ;)  I''ll
give
her a test drive later this morning and let you know how it goes.

Thanks!

 -Don