feat: clean up old instances automatically
This commit is contained in:
parent
5aa5fe0f5a
commit
070ffa8eeb
8 changed files with 85 additions and 42 deletions
|
@ -21,8 +21,14 @@ default: &default
|
|||
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: ecoffee_development
|
||||
primary:
|
||||
<<: *default
|
||||
database: ecoffee_development
|
||||
queue:
|
||||
<<: *default
|
||||
database: ecoffee_development_queue
|
||||
migrations_paths: db/queue_migrate
|
||||
|
||||
|
||||
# The specified database role being used to connect to PostgreSQL.
|
||||
# To create additional roles in PostgreSQL see `$ createuser --help`.
|
||||
|
|
|
@ -54,6 +54,9 @@ 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.active_job.verbose_enqueue_logs = true
|
||||
config.solid_queue.connects_to = { database: { writing: :queue } }
|
||||
|
||||
# Raises error for missing translations.
|
||||
# config.i18n.raise_on_missing_translations = true
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
# production:
|
||||
# periodic_cleanup:
|
||||
# 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
|
||||
production:
|
||||
periodic_cleanup:
|
||||
class: InstanceCleanupJob
|
||||
schedule: every 2 days at 10:00am
|
||||
development:
|
||||
periodic_cleanup:
|
||||
class: InstanceCleanupJob
|
||||
schedule: every 30 seconds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue