diff --git a/.env b/.env index c8df50c68..c51b5a51e 100644 --- a/.env +++ b/.env @@ -23,7 +23,7 @@ PASSENGER_APP_ENV=development RAILS_LOG_TO_STDOUT=true REDIS_HOST=redis SECRET_KEY_BASE=asdf -HYRAX_ACTIVE_JOB_QUEUE=sidekiq +HYRAX_ACTIVE_JOB_QUEUE=good_job HYRAX_FITS_PATH=/app/fits/fits.sh NEGATIVE_CAPTCHA_SECRET=default-value-change-me SOLR_ADMIN_PASSWORD=SolrRocks diff --git a/config/routes.rb b/config/routes.rb index dd3a92676..93f74b568 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -2,7 +2,7 @@ # OVERRIDE Hyrax 2.9.0 to add featured collection routes -if ENV.fetch('HYRAX_ACTIVE_JOB_QUEUE', 'sidekiq') +if ENV.fetch('HYRAX_ACTIVE_JOB_QUEUE', 'sidekiq') == 'sidekiq' require 'sidekiq/web' end @@ -17,7 +17,7 @@ authenticate :user, ->(u) { u.is_superadmin || u.is_admin } do queue = ENV.fetch('HYRAX_ACTIVE_JOB_QUEUE', 'sidekiq') case queue - when 'sideki' + when 'sidekiq' mount Sidekiq::Web => '/jobs' when 'good_job' mount GoodJob::Engine => '/jobs' diff --git a/db/schema.rb b/db/schema.rb index c7e628973..c523cfd22 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -13,6 +13,7 @@ ActiveRecord::Schema.define(version: 2023_08_04_073106) do # These are extensions that must be enabled in order to support this database + enable_extension "pgcrypto" enable_extension "plpgsql" create_table "account_cross_searches", force: :cascade do |t| @@ -312,6 +313,37 @@ t.index ["user_id"], name: "index_file_view_stats_on_user_id" end + create_table "good_job_processes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.jsonb "state" + end + + create_table "good_jobs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.text "queue_name" + t.integer "priority" + t.jsonb "serialized_params" + t.datetime "scheduled_at" + t.datetime "performed_at" + t.datetime "finished_at" + t.text "error" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.uuid "active_job_id" + t.text "concurrency_key" + t.text "cron_key" + t.uuid "retried_good_job_id" + t.datetime "cron_at" + t.index ["active_job_id", "created_at"], name: "index_good_jobs_on_active_job_id_and_created_at" + t.index ["active_job_id"], name: "index_good_jobs_on_active_job_id" + t.index ["concurrency_key"], name: "index_good_jobs_on_concurrency_key_when_unfinished", where: "(finished_at IS NULL)" + t.index ["cron_key", "created_at"], name: "index_good_jobs_on_cron_key_and_created_at" + t.index ["cron_key", "cron_at"], name: "index_good_jobs_on_cron_key_and_cron_at", unique: true + t.index ["finished_at"], name: "index_good_jobs_jobs_on_finished_at", where: "((retried_good_job_id IS NULL) AND (finished_at IS NOT NULL))" + t.index ["queue_name", "scheduled_at"], name: "index_good_jobs_on_queue_name_and_scheduled_at", where: "(finished_at IS NULL)" + t.index ["scheduled_at"], name: "index_good_jobs_on_scheduled_at", where: "(finished_at IS NULL)" + end + create_table "group_roles", force: :cascade do |t| t.bigint "role_id" t.bigint "group_id"