Skip to content

Commit

Permalink
Merge pull request #2055 from samvera/avoid-present-call-in-non-rails…
Browse files Browse the repository at this point in the history
…-situation

🧹 Avoid `#present?` in non-Rails situations
  • Loading branch information
jeremyf authored Dec 15, 2023
2 parents 5177c95 + 8b64bf8 commit 553dec5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/web
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/local/bin/ruby
# frozen_string_literal: true
`echo "$GOOGLE_OAUTH_PRIVATE_KEY_VALUE" | base64 -d > prod-cred.p12` if ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'].present?
`echo "$GOOGLE_OAUTH_PRIVATE_KEY_VALUE" | base64 -d > prod-cred.p12` unless ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'].to_s.strip.empty?

exec "bundle exec puma -v -b tcp://0.0.0.0:3000"
8 changes: 4 additions & 4 deletions bin/worker
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/local/bin/ruby
# frozen_string_literal: true
`echo "$GOOGLE_OAUTH_PRIVATE_KEY_VALUE" | base64 -d > prod-cred.p12` if ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'].present?
`echo "$GOOGLE_OAUTH_PRIVATE_KEY_VALUE" | base64 -d > prod-cred.p12` unless ENV['GOOGLE_OAUTH_PRIVATE_KEY_VALUE'].to_s.strip.empty?

if ENV['DATABASE_URL'].present?
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', 'pool=30')
else
if ENV['DATABASE_URL'].to_s.strip.empty?
puts 'DATABASE_URL not set, no pool change needed'
else
ENV['DATABASE_URL'] = ENV['DATABASE_URL'].gsub('pool=5', 'pool=30')
end

queue = ENV.fetch('HYRAX_ACTIVE_JOB_QUEUE', 'sidekiq')
Expand Down

0 comments on commit 553dec5

Please sign in to comment.