2015-06-13 60 views
0

我已經設置了延遲迴形針和sidekiq,但是當我再次嘗試照片上傳,日誌的出把低於:delayed_pa​​perclip不打sidekiq

[ActiveJob] Enqueued DelayedPaperclip::Jobs::ActiveJob (Job ID: f9bf0100-2c5b-4c30-af04-9fb9b4ee8c5e) to Inline(paperclip) with arguments: "CarPhoto", 32, "image" 
[ActiveJob] [DelayedPaperclip::Jobs::ActiveJob] [f9bf0100-2c5b-4c30-af04-9fb9b4ee8c5e] Performing DelayedPaperclip::Jobs::ActiveJob from Inline(paperclip) with arguments: "CarPhoto", 32, "image" 
[ActiveJob] [DelayedPaperclip::Jobs::ActiveJob] [f9bf0100-2c5b-4c30-af04-9fb9b4ee8c5e] CarPhoto Load (0.5ms) SELECT "car_photos".* FROM "car_photos" WHERE "car_photos"."id" = $1 LIMIT 1 [["id", 32]] 

這表明Activejob正在做的工作..並在sidekiq控制檯的另一面,我沒有看到被記錄任何東西了..所以我想知道如果我錯過什麼。

回答

1

你還沒告訴ActiveJob所以它使用的是內聯適配器使用Sidekiq。

# config/application.rb 
module YourApp 
    class Application < Rails::Application 
    # Be sure to have the adapter's gem in your Gemfile and follow 
    # the adapter's specific installation and deployment instructions. 
    config.active_job.queue_adapter = :sidekiq 
    end 
end 
+0

謝謝,剛剛意識到它的一個rails 4.2的東西 –