config: flip config.active_storage.queues

ActiveStorage jobs are now moved to their own queue.

For consistency, we also move our own analysis jobs (VirusScannerJob)
on the same `:active_storage_analysis` queue.
This commit is contained in:
Pierre de La Morinerie 2020-07-13 17:48:09 +02:00
parent c6cdd08373
commit 54a4db1c47
2 changed files with 4 additions and 2 deletions

View file

@ -1,4 +1,6 @@
class VirusScannerJob < ApplicationJob
queue_as :active_storage_analysis
discard_on ActiveRecord::RecordNotFound
def perform(blob)

View file

@ -23,8 +23,8 @@ Rails.application.config.action_dispatch.return_only_media_type_on_content_type
Rails.application.config.active_job.return_false_on_aborted_enqueue = true
# Send Active Storage analysis and purge jobs to dedicated queues.
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
Rails.application.config.active_storage.queues.purge = :active_storage_purge
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.