From 0f0f7c768b1eb5430c0befe91ded1102f95df7a8 Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 6 Mar 2022 20:29:56 -0600 Subject: [PATCH] jobs: use GoodJob in development. Use the GoodJob job adapter instead of the default Rails async job adapter in development mode. The default async adapter runs jobs in a background thread in the `bin/rails server` process, but this sometimes has problems with jobs blocking the main server thread. The job queue interface at `/jobs` also didn't work with this. This means that now you have to run `bin/good_job start` in development mode in order to work background jobs. This is required for uploads to work. --- config/environments/development.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/config/environments/development.rb b/config/environments/development.rb index c062cad43..cac1e437a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -53,6 +53,7 @@ Rails.application.configure do # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true + config.active_job.queue_adapter = :good_job # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true