[Backgroundrb-devel] Unintended thread forked in autostart

Kenichi Sugihara sugihara at ing.co.jp
Wed Dec 13 02:54:32 EST 2006

Hello all,

I've got the problem about the following simple application using
autostart and repeat_every.

A thread(?) is forked for processing task at first, but at sencond time
two threads seem to be forked.

My simple application code is...

- In worker class
  class FooWorker < BackgrounDRb:Rails
  repeat_every 2.minutes
  first_run Time.now

  def do_work
     puts Time.now.to_s + "Start processing....."
     puts Time.now.to_s + "Finish processing"

- In background.yml

     class: foo_worker
     arg: ''

Result is....
  --- First time---
  Start processing
  Finish processing

  --- Second time ---
  Start processing
  Start processing
  Finish processing
  Finish processing


Kenichi Sugihara

More information about the Backgroundrb-devel mailing list