Sunday, November 02, 2008

Quick note about Workling

I have found that when using Starling, setting "Workling::Remote.dispatcher = Workling::Remote::Runners::StarlingRunner.new" in environment.rb is not necessary because Workling checks the existence of Starling before any other gems or plugins such as Spawn.

I've found this by looking at the code vendor/plugins/workling/lib/workling.rb, self.default_runner, which was a point of failure at one execution.

self.default_runner takes care of setting it automatically.

The problem was that when it is set in environment.rb or even only in environments/development.rb, "rake spec" fails reading the setting for development environment in config/starling.yml. (Even when I explicitly set ENV["RAILS_ENV"] = "test".)

If another background process gem or plugin is used such as Spawn while Starling gem is still installed, Starling is still picked up. I think we can specify Spawn in environment.rb.

Or it would be ideal if only one background process gem/plugin installed out of Starling, Spawn, and Backgroundjob.

No comments: