lib/maitredee/active_job.rb in maitredee-0.8.2 vs lib/maitredee/active_job.rb in maitredee-0.8.3

- old
+ new

@@ -12,9 +12,19 @@ def self.create_publisher_job(subclass) subclass.const_set("PublisherJob", Class.new(BasePublisherJob)) subclass::PublisherJob.service_class = subclass end + # Uses ActieJob to async the publishing + # @example To configure the specific async job open PublisherJob + # class RecipePublisher < Maitredee::Publisher + # class PublisherJob + # queue_as :low + # end + # end + # + # RecipePublisher.call_later(Recipe.find(1)) + # def call_later(*args) self::PublisherJob.perform_later(*args) end private