How to reference active delayed_job within the actual job
问题 I am working on a solution to display the percentage completion of a delayed job (using the delayed_job gem). At the present, I have a database migration that looks like the following for my delayed_jobs table: class CreateDelayedJobs < ActiveRecord::Migration def self.up create_table :delayed_jobs, :force => true do |table| table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue table.integer :attempts, :default => 0 # Provides for retries, but still fail