Skip to content

Commit

Permalink
🎁 only add Good Job classes if it's enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanaLMoore committed Jan 4, 2024
1 parent 0405409 commit 826ed40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/initializers/apartment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
Apartment.configure do |config|
# 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 GoodJob::Execution GoodJob::Job GoodJob::Process]
config.excluded_models = %w[Account AccountCrossSearch DomainName Endpoint User UserStat SolrEndpoint FcrepoEndpoint RedisEndpoint]
config.excluded_models += %w[GoodJob::Execution GoodJob::Job GoodJob::Process] if ENV.fetch('HYRAX_ACTIVE_JOB_QUEUE', 'sidekiq') == 'good_job'

# 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

0 comments on commit 826ed40

Please sign in to comment.