This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am kcdragon on github. | |
* I am kcdragon (https://keybase.io/kcdragon) on keybase. | |
* I have a public key whose fingerprint is 9BCD 0964 3B79 0BAA 2A47 20DA C4E9 439D 4D72 483A | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before :deploy do | |
# Get the topmost migration that has been run: | |
run "rake db:current_version > migration_version.txt" | |
end | |
after 'deploy:rollback' do | |
run "rake db:migrate VERSION=`cat migration_version.txt`" | |
end | |
after :deploy do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :sidekiq do | |
detect_duplicate_processes = ->(context, server) do | |
number_of_sidekiq_processes = context.capture('ps aux | grep "[s]idekiq" | wc -l').to_i | |
rails_env = context.fetch(:rails_env, nil) | |
hipchat_token = context.fetch(:hipchat_token, nil) | |
hipchat_room_name = context.fetch(:hipchat_room_name, nil) | |
client = HipChat::Client.new(hipchat_token, {}) |
NewerOlder