lib/eco/api/session/batch_jobs.rb in eco-helpers-0.8.4 vs lib/eco/api/session/batch_jobs.rb in eco-helpers-0.9.1
- old
+ new
@@ -21,13 +21,13 @@
def exists?(name)
@jobs.key?(name)
end
- def new(name, type:, sets:)
+ def new(name, type:, sets:, usecase: nil)
fatal "Can't create job named '#{name}' because it already exists." if exists?(name)
- BatchJob.new(enviro, name: name, type: type, sets: sets).tap do |job|
+ BatchJob.new(enviro, name: name, type: type, sets: sets, usecase: usecase).tap do |job|
@jobs[name] = job
@callbacks[job] = Proc.new if block_given?
end
end