Skip to content

Commit

Permalink
Merge branch 'mr_good_job_its_got_to_be_good' into adventist_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Oct 3, 2023
2 parents d8117ad + 64d9281 commit 5155798
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/initializers/apartment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Add any models that you do not want to be multi-tenanted, but remain in the global (public) namespace.
# A typical example would be a Customer or Tenant model that stores each Tenant's information.
config.excluded_models = %w{ Account AccountCrossSearch DomainName Endpoint User UserStat SolrEndpoint FcrepoEndpoint RedisEndpoint }
config.excluded_models = %w{ Account AccountCrossSearch DomainName Endpoint User UserStat SolrEndpoint FcrepoEndpoint RedisEndpoint GoodJob::Execution GoodJob::Job GoodJob::Process }

# In order to migrate all of your Tenants you need to provide a list of Tenant names to Apartment.
# You can make this dynamic by providing a Proc object to be called on migrations.
Expand Down
16 changes: 16 additions & 0 deletions db/migrate/20230406183810_setup_good_jobs_schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

# This migration pre-sets the shared_extensions schema for in prep for good_jobs
class SetupGoodJobsSchema < ActiveRecord::Migration[5.2]
def change
# Create Schema
ActiveRecord::Base.connection.execute 'CREATE SCHEMA IF NOT EXISTS shared_extensions;'
# Enable Hstore
ActiveRecord::Base.connection.execute 'CREATE EXTENSION IF NOT EXISTS HSTORE SCHEMA shared_extensions;'
# Enable UUID-OSSP
ActiveRecord::Base.connection.execute 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp" SCHEMA shared_extensions;'
ActiveRecord::Base.connection.execute 'CREATE EXTENSION IF NOT EXISTS "pgcrypto" SCHEMA shared_extensions;'
# Grant usage to public
ActiveRecord::Base.connection.execute 'GRANT usage ON SCHEMA shared_extensions to public;'
end
end
2 changes: 2 additions & 0 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
ActiveRecord::Schema.define(version: 2023_08_04_073106) do

# These are extensions that must be enabled in order to support this database
enable_extension "hstore"
enable_extension "pgcrypto"
enable_extension "plpgsql"
enable_extension "uuid-ossp"

create_table "account_cross_searches", force: :cascade do |t|
t.bigint "search_account_id"
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ services:

web:
<<: *app
# Uncomment command to access container with out starting Rails. Useful for debugging
# Uncomment command to access container with out starting bin/web. Useful for debugging
# command: sleep infinity
environment:
- VIRTUAL_PORT=3000
Expand Down Expand Up @@ -167,6 +167,8 @@ services:
worker:
<<: *app
image: ghcr.io/samvera/hyku/worker:${TAG:-latest}
# Uncomment command to access container with out starting bin/worker. Useful for debugging
# command: sleep infinity
build:
context: .
target: hyku-worker
Expand All @@ -176,7 +178,6 @@ services:
- ghcr.io/samvera/hyku/base:latest
- ghcr.io/samvera/hyku:latest
- ghcr.io/samvera/hyku/worker:latest
command: bundle exec sidekiq
depends_on:
check_volumes:
condition: service_completed_successfully
Expand Down

0 comments on commit 5155798

Please sign in to comment.