I hereby claim:
- I am johankok on github.
- I am johankok (https://keybase.io/johankok) on keybase.
- I have a public key whose fingerprint is B4D1 D25C 72E6 A16F B4F3 AF79 B444 A600 FF5E BFC2
To claim this, I am signing this object:
| namespace :db do | |
| namespace :sessions do | |
| desc "Clean up expired Active Record sessions (updated before ENV['EXPIRE_AT'], defaults to 1 month ago)." | |
| task :expire => :environment do | |
| Rails.logger.info "Cleaning up expired sessions..." | |
| puts "Cleaning up expired sessions..." | |
| time = ENV['EXPIRE_AT'] || 1.month.ago.to_s(:db) | |
| rows = ActiveRecord::SessionStore::Session.delete_all ["updated_at < ?", time] | |
| Rails.logger.info "Expired sessions cleanup: #{rows} session row(s) deleted." | |
| puts "Expired sessions cleanup: #{rows} session row(s) deleted." |
| # an example Monit configuration file for delayed_job | |
| # | |
| # To use: | |
| # 1. copy to /var/www/apps/{app_name}/shared/delayed_job.monitrc | |
| # 2. replace {app_name} and {environment} as appropriate | |
| # 3. add this to your /etc/monit/monitrc | |
| # | |
| # include /var/www/apps/{app_name}/shared/delayed_job.monitrc | |
| check process delayed_job with pidfile /var/www/apps/{app_name}/shared/pids/delayed_job.pid |
I hereby claim:
To claim this, I am signing this object:
kubectl apply -f gist.ymlLet me know what happens. If you see a red animation going backwards and forwards then everything's working right.