title: Delayed job jobs not executing
body: <p>I'm working with delayed job for the first time and I am not having any luck getting it to work and I don't understand why.  The job gets queued, but never executes.  It does get removed from the database though, so the worker seems to be processing it, but it doesn't ever run the perform method it seems.</p>
  
  <p>I've set up the following initalizer:</p>
  
  <pre><code>require 'delayed/worker'
  Dir.glob("./app/jobs/*.rb").each { |f| require f }
  
  Delayed::Worker.logger = ActiveSupport::BufferedLogger.new("log/dj.log", Rails.logger.level)
  module Delayed
    class Worker
      def self.dj_say(text)
        self.logger.info "#{Time.now.strftime('%F %T %z')}: #{text}" 
      end
    end
  end
  </code></pre>
  
  <p>The initializer works, and dj.log does get written to when the work starts/exits.</p>
  
  <p>My job consists of the following:</p>
  
  <pre><code>class UpdateServices
    attr_accessor :options
    def initialize(options)
      self.options = options
    end
  
    def perform
      #Debugging code
      Delayed::Worker.dj_say "starting"
      File.open("tmp/test.txt","w").close
      #End debugging code
      #bunch-o-code-here
      Delayed::Worker.dj_say "completed"
    end
  end
  </code></pre>
  
  <p>None of this code ever runs.  I've tried adding debugging code into the perform method, and it never gets executed, so there is definitely something going on.  I call the job from a model like this:</p>
  
  <pre><code>class Service &lt; ActiveRecord::Base
    def start_updating!(options)
      Delayed::Job.enqueue(UpdateServices.new(options), :priority =&gt; 0, :run_at =&gt; 30.seconds.from_now, :queue =&gt; 'update_services')
    end
  end
  </code></pre>
  
  <p>That model is called from my controller like this:</p>
  
  <pre><code>Service.new.start_updating!(params)
  </code></pre>
  
  <p>My only guess is that I'm called Delayed::Job.enqueue incorrectly, but this seems to be how it should be done based on everything I've read.</p>