File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ gem "dotenv-rails"
99
1010gem "propshaft"
1111# Use postgresql as the database for Active Record
12- gem "pg" , "~> 1.1 "
12+ gem "pg" , "~> 1.5.9 "
1313# Use the Puma web server [https://github.com/puma/puma]
1414gem "puma" , ">= 5.0"
1515# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
Original file line number Diff line number Diff line change @@ -420,7 +420,7 @@ DEPENDENCIES
420420 importmap-rails
421421 jbuilder
422422 kamal
423- pg (~> 1.1 )
423+ pg (~> 1.5.9 )
424424 propshaft
425425 puma (>= 5.0 )
426426 rails (~> 8.0.2 )
Original file line number Diff line number Diff line change 1+ release : rake db:migrate
2+ web : bundle exec puma -C config/puma.rb
3+ worker : bundle exec sidekiq -c 2 -q default
4+ bot : bundle exec rake discord:start_bot
Original file line number Diff line number Diff line change @@ -18,6 +18,11 @@ default: &default
1818 # For details on connection pooling, see Rails configuration guide
1919 # https://guides.rubyonrails.org/configuring.html#database-pooling
2020 pool : <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
21+ port : 5432
22+ username : <%= ENV["DB_USERNAME"] || "postgres" %>
23+ password : <%= ENV["DB_PASSWORD"] %>
24+ host : <%= ENV["DB_HOST"] || "localhost" %>
25+ timeout : 5000
2126
2227
2328development :
8186production :
8287 primary : &primary_production
8388 << : *default
84- database : ruby_or_rails_production
85- username : ruby_or_rails
86- password : <%= ENV["RUBY_OR_RAILS_DATABASE_PASSWORD"] %>
89+ url : <%= ENV["DATABASE_URL"] %>
8790 cache :
8891 << : *primary_production
8992 database : ruby_or_rails_production_cache
Original file line number Diff line number Diff line change 1+ require "sidekiq"
2+
3+ # Heroku generates a rediss URL but since
4+ # the SSL certificate is self-signed, verification throws an error.
5+ Sidekiq . configure_server do |config |
6+ config . redis = {
7+ url : ENV . fetch ( "REDIS_URL" , "redis://localhost:6379/0" ) ,
8+ ssl_params : { verify_mode : OpenSSL ::SSL ::VERIFY_NONE }
9+ }
10+ end
11+
12+ Sidekiq . configure_client do |config |
13+ config . redis = {
14+ url : ENV . fetch ( "REDIS_URL" , "redis://localhost:6379/0" ) ,
15+ ssl_params : { verify_mode : OpenSSL ::SSL ::VERIFY_NONE }
16+ }
17+ end
Original file line number Diff line number Diff line change 1- :schedule :
2- daily_puzzle_job :
3- cron : " 0 9 * * *" # This runs the job at 9:00 AM every day
4- class : " SendDailyPuzzleJob"
5-
6- weekly_puzzle_job :
7- cron : " 0 0 * * 0" # This runs the every Sunday at midnight
8- class : " SendWeeklyPuzzleJob"
1+ :scheduler :
2+ :schedule :
3+ daily_puzzle_job :
4+ cron : " 0 9 * * *" # This runs the job at 9:00 AM every day
5+ class : " SendDailyPuzzleJob"
6+
7+ weekly_puzzle_job :
8+ cron : " 0 0 * * 0" # This runs the every Sunday at midnight
9+ class : " SendWeeklyPuzzleJob"
You can’t perform that action at this time.
0 commit comments