title: rails delayed_paperclip process_in_background not working
body: <p>I have an attachment model having a picture(the rest of the definition exist but line below is enough)</p>
  
  <pre><code>has_mongoid_attached_file :picture
  </code></pre>
  
  <p>I want to make the resizing process happen at background by using "delayed_paperclip" gem having a method named "process_in_background" :</p>
  
  <pre><code>process_in_background :picture
  </code></pre>
  
  <p>and then I started a foreground logging worker:</p>
  
  <pre><code>./script/delayed_job run
  delayed_job: process with pid 32393 started.
  </code></pre>
  
  <p>and then posted a file to a specific url to upload the file and see the results but nothing special happened. file uploaded with the worker logging nothing.
  even I stopped the worker and reposted the file and then executed:</p>
  
  <pre><code>rake jobs:workoff
  </code></pre>
  
  <p>but nothing was in queue!</p>
  
  <p>even I put a <code>puts "hello world"</code> in the beginning of process_in_background method in the <code>delayed_paperclip.rb</code>(in the gem source code) but nothing logged meaning that it is not being executed.</p>
  
  <p>How can i fix this problem? tnx.</p>
  
  <p><strong>UPDATE</strong>:
  my server log:</p>
  
  <pre><code>Command :: file -b --mime '/tmp/120131203-2768-q7a6cz20131203-2768-15kecj3'
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:26 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:26 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:26 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (0.9518ms)
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:31 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:31 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:31 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (1.0488ms)
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:36 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:36 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:36 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (1.0679ms)
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:41 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:41 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:41 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (1.0037ms)
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:46 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:46 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:46 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (1.1113ms)
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:51 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:51 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:51 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (1.7586ms)
    MOPED: 127.0.0.1:27017 COMMAND      database=project_development command={:findAndModify=&gt;"delayed_backend_mongoid_jobs", :query=&gt;{"run_at"=&gt;{"$lte"=&gt;2013-12-03 10:58:56 UTC}, "failed_at"=&gt;nil, "$or"=&gt;[{"locked_by"=&gt;"host:BlackBox pid:3113"}, {"locked_at"=&gt;nil}, {"locked_at"=&gt;{"$lt"=&gt;2013-12-03 06:58:56 UTC}}]}, :new=&gt;true, :sort=&gt;{"locked_by"=&gt;-1, "priority"=&gt;1, "run_at"=&gt;1}, :update=&gt;{"$set"=&gt;{:locked_at=&gt;2013-12-03 10:58:56 UTC, :locked_by=&gt;"host:BlackBox pid:3113"}}} (1.0285ms)
  </code></pre>