delayed_paperclip 没有击中 sidekiq

delayed_paperclip is not hitting sidekiq

我已经设置了延迟回形针和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" =  LIMIT 1  [["id", 32]]

这表明 Activejob 正在执行此工作。在 sidekiq 控制台的另一侧,我没有看到任何注销。所以我想知道我是否遗漏了什么。

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