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.
This commit is contained in:
evazion
2022-03-06 20:29:56 -06:00
parent a160a3acce
commit 0f0f7c768b

View File

@@ -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