Changeset 271
- Timestamp:
- 12/13/07 07:48:15 (8 months ago)
- Files:
-
- trunk/README (modified) (3 diffs)
- trunk/server/meta_worker.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/README
r268 r271 40 40 | :ip: 0.0.0.0 41 41 | :port: 11006 42 | :environment: production 42 43 | 43 44 | :schedules: … … 50 51 51 52 Above sample configuration file would schedule worker methods 'foobar' and 'barbar' 52 to be executed at different trigger periods. 53 to be executed at different trigger periods. Also, it would load production rails environment. 54 If you skit the :environment option, development env will be loaded. 53 55 54 56 NOTE: Please note that, because of addition of this feature, format of backgroundrb.yml … … 237 239 care, so as for one worker, they are never the same. 238 240 241 * Starting and stopping from CLI : 242 To start: 243 ./script/backgroundrb start 244 Top stop: 245 ./script/backgroundrb stop 246 247 239 248 * Query Status/Result of a worker : 240 249 trunk/server/meta_worker.rb
r270 r271 191 191 ActiveRecord::Base.allow_concurrency = true 192 192 db_config_file = YAML.load(ERB.new(IO.read("#{RAILS_HOME}/config/database.yml")).result) 193 run_env = @config_file[:backgroundrb][:environment] 193 run_env = @config_file[:backgroundrb][:environment] || 'development' 194 194 require RAILS_HOME + '/config/environment.rb' 195 195 ENV['RAILS_ENV'] = run_env
