lib/rocket_job/dirmon_entry.rb in rocketjob-2.0.0.rc2 vs lib/rocket_job/dirmon_entry.rb in rocketjob-2.0.0.rc3
- old
+ new
@@ -303,13 +303,15 @@
end
# Queues the job for the supplied pathname
def later(pathname)
if klass = job_class
- job = klass.new(properties.merge(arguments: arguments))
- upload_file(job, pathname)
- job.save!
- job
+ logger.benchmark_info "Enqueued: #{name}, Job class: #{job_class_name}" do
+ job = klass.new(properties.merge(arguments: arguments))
+ upload_file(job, pathname)
+ job.save!
+ job
+ end
else
raise(ArgumentError, "Cannot instantiate a class for: #{job_class_name.inspect}")
end
end