lib/cronicle/client.rb in cronicle-0.1.4 vs lib/cronicle/client.rb in cronicle-0.1.5

- old
+ new

@@ -1,11 +1,11 @@ class Cronicle::Client include Cronicle::Logger::Helper DEFAULTS = { :concurrency => 10, - :libexec => '/var/lib/cronicle/libexec' + :var_dir => '/var/lib/cronicle' } def initialize(host_list, options = {}) @host_list = host_list @options = DEFAULTS.merge(options) @@ -136,9 +136,11 @@ }.map(&:to_s) (selected_hots + dsl_hosts).uniq.each do |h| if hosts[h][job_user][job_name] log(:warn, "Job is duplicated", :color => :yellow, :host => h, :user => job_user, :job => job_name) + elsif job_name.nil? + hosts[h] ||= {} else hosts[h][job_user][job_name] = job_hash end end end