Permalink
Browse files

correctly default CloudCrowd.config[:work_unit_retries]

  • Loading branch information...
1 parent 521460d commit f966a6fa3d3bdf76e4a8ca96f7b490c890431f52 @jashkenas jashkenas committed Sep 10, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/cloud-crowd.rb
View
@@ -59,6 +59,9 @@ module CloudCrowd
# Default folder to contain the pids of daemonized servers and nodes.
PID_PATH = 'tmp/pids'
+ # Minimum number of attempts per work unit.
+ MIN_RETRIES = 1
+
# A Job is processing if its WorkUnits are in the queue to be handled by nodes.
PROCESSING = 1
@@ -94,6 +97,7 @@ class << self
def configure(config_path)
@config_path = File.expand_path(File.dirname(config_path))
@config = YAML.load(ERB.new(File.read(config_path)).result)
+ @config[:work_unit_retries] ||= MIN_RETRIES
end
# Configure the CloudCrowd central database (and connect to it), by passing

0 comments on commit f966a6f

Please sign in to comment.