Sha256: 81147be258eb6245fc773e67c99a6f9d2a0cdf5a897beb56f9d0efd976a61bbd

Contents?: true

Size: 457 Bytes

Versions: 9

Compression:

Stored size: 457 Bytes

Contents

module Resque
  class Job
    # Attempts to perform the work represented by this job instance.
    # Calls #perform on the class given in the payload with the
    # arguments given in the payload.
    # The worker is passed in so the status can be set for the UI to display.
    def perform
      args ? payload_class.perform(*args) { |status| self.worker.status = status } : payload_class.perform { |status| self.worker.status = status }
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
resque_ui-3.1.7 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.6 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.5 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.4 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.3 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.2 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.1 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.1.0 lib/resque_ui/overrides/resque/job.rb
resque_ui-3.0.0 lib/resque_ui/overrides/resque/job.rb