Skip to content

Commit

Permalink
default ActiveJob to AsyncAdapter with 1 worker
Browse files Browse the repository at this point in the history
  • Loading branch information
ericfranz committed Apr 14, 2021
1 parent f342736 commit b1fee75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions apps/dashboard/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,7 @@
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker

config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \
min_threads: 1, max_threads: 1
end
3 changes: 2 additions & 1 deletion apps/dashboard/config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,6 @@

# Do not dump schema after migrations.
# config.active_record.dump_schema_after_migration = false

config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \
min_threads: 1, max_threads: 1
end
8 changes: 7 additions & 1 deletion apps/dashboard/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
config.action_dispatch.show_exceptions = false

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false
# FIXME: normally this is disabled, we enable it because our code actually assumes it will
# be enabled (and thus system tests fail when it is disabled)
#
# config.action_controller.allow_forgery_protection = false
config.action_mailer.perform_caching = false

# Tell Action Mailer not to deliver emails to the real world.
Expand All @@ -39,4 +42,7 @@

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
#
config.active_job.queue_adapter = ActiveJob::QueueAdapters::AsyncAdapter.new \
min_threads: 1, max_threads: 1
end

0 comments on commit b1fee75

Please sign in to comment.