lib/backgrounder/orm/data_mapper.rb in carrierwave_backgrounder-0.0.8 vs lib/backgrounder/orm/data_mapper.rb in carrierwave_backgrounder-0.0.9
- old
+ new
@@ -18,11 +18,11 @@
self.#{column}_processing = true if respond_to?(:#{column}_processing)
end
def enqueue_#{column}_background_job
if trigger_#{column}_background_processing?
- ::Delayed::Job.enqueue #{worker}.new(self.class, id, #{column}.mounted_as)
+ CarrierWave::Backgrounder.enqueue_for_backend(#{worker}, self.class.name, id, #{column}.mounted_as)
@#{column}_changed = false
end
end
def trigger_#{column}_background_processing?
@@ -53,10 +53,10 @@
super() if process_#{column}_upload
end
def enqueue_#{column}_background_job
if trigger_#{column}_background_storage?
- ::Delayed::Job.enqueue #{worker}.new(self.class, id, #{column}.mounted_as)
+ CarrierWave::Backgrounder.enqueue_for_backend(#{worker}, self.class.name, id, #{column}.mounted_as)
@#{column}_changed = false
end
end
def trigger_#{column}_background_storage?