Add screenshots to elements
Some checks failed
/ Run tests (push) Failing after 1m43s
/ Run system tests (push) Failing after 2m10s
/ Build, push and deploy image (push) Has been skipped

This commit is contained in:
david 2024-11-12 22:43:59 +01:00
parent c7c6023acf
commit 2293751fe2
18 changed files with 232 additions and 20 deletions

View file

@ -11,8 +11,13 @@ default: &default
default_transaction_mode: IMMEDIATE
development:
<<: *default
database: storage/development.sqlite3
primary:
<<: *default
database: storage/development.sqlite3
queue:
<<: *default
database: storage/development_queue.sqlite3
migrations_paths: db/queue_migrate
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
@ -22,5 +27,10 @@ test:
database: storage/test.sqlite3
production:
<<: *default
database: storage/production.sqlite3
primary:
<<: *default
database: storage/production.sqlite3
queue:
<<: *default
database: storage/production_queue.sqlite3
migrations_paths: db/queue_migrate

View file

@ -60,6 +60,8 @@ Rails.application.configure do
# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
config.active_job.queue_adapter = :solid_queue
config.solid_queue.connects_to = { database: { writing: :queue } }
# Suppress logger output for asset requests.
config.assets.quiet = true
@ -67,7 +69,7 @@ Rails.application.configure do
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# Annotate rendered view with file nactive_jobames.
config.action_view.annotate_rendered_view_with_filenames = true
# Uncomment if you wish to allow Action Cable access from any origin.

View file

@ -73,7 +73,9 @@ Rails.application.configure do
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment).
# config.active_job.queue_adapter = :resque
config.active_job.queue_adapter = :solid_queue
config.solid_queue.connects_to = { database: { writing: :queue } }
# config.active_job.queue_name_prefix = "a11yist_production"
# Disable caching for Action Mailer templates even if Action Controller

View file

@ -28,6 +28,7 @@ port ENV.fetch("PORT", 3000)
# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart
plugin :solid_queue
# Only use a pidfile when requested
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]

18
config/queue.yml Normal file
View file

@ -0,0 +1,18 @@
default: &default
dispatchers:
- polling_interval: 1
batch_size: 500
workers:
- queues: "*"
threads: 3
processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
polling_interval: 0.1
development:
<<: *default
test:
<<: *default
production:
<<: *default

10
config/recurring.yml Normal file
View file

@ -0,0 +1,10 @@
# production:
# cleanup_session:
# class: CleanSoftDeletedRecordsJob
# queue: background
# args: [ 1000, { batch_size: 500 } ]
# schedule: every hour
# periodic_command:
# command: "SoftDeletedRecord.due.delete_all"
# priority: 2
# schedule: at 5am every day