Forum: Ruby on Rails backgroundrb launched 8 workers via cron which I did not understand

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
(Guest)
on 2009-05-13 19:43
(Received via mailing list)
I have a worker my_tree worker as shown in my backgroundrb.yml file
below.
I played around with the trigger_args setting which I had it calling
update_main_tree() every 1 minute.
This opens a tree structure in my db that I set and rebuilds it. After
it seemed to be working ok, I then
set the tree to be updated to be a larger tree and set the
trigger_args  to happen at 8:00 pm, and then went home.
I do not have reload_on_schedule set. When I came in the next day, my
machine was nearly hung as at 8:00 pm
according to my log file, 8 different workers got launched on
update_main_tree()

:schedules:
  :session_mgr_worker:
    :expire_sessions:
      :trigger_args: 0 0 */6 * * * *
  :my_tree_worker:
    :update_main_tree:
      :trigger_args: 0 0 20 * * * *
  #   :trigger_args: 0 */1 * * * * *
Larz (Guest)
on 2009-05-13 20:33
(Received via mailing list)
I noticed that the example in my book has an explicit exit() call at
the end of the worker create(). I think that might have something to
do with it as when I invoke other methods that
create workers, instances of packet_worker_runner seem to hang around.
I didn't have such an exit() call in my code.
This topic is locked and can not be replied to.