delayed_pa​​perclip没有击中sidekiq

时间:2015-06-13 11:41:07

标签: paperclip sidekiq rails-activejob

我设置了延迟回形针和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 个答案:

答案 0 :(得分:2)

你还没有告诉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