This file contains hidden or 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 :retry do | |
| require 'rubygems' | |
| desc 'Retry Resque DirtyExit jobs' | |
| task resque_dirtyexit_jobs: :environment do | |
| redis = Resque.redis | |
| (0...Resque::Failure.count).each do |i| | |
| serialized_job = redis.lindex(:failed, i) | |
| job = Resque.decode(serialized_job) |
This file contains hidden or 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
| aws opsworks --region us-east-1 create-deployment --stack-id 935450cc-61e0-4b03-a3e0-160ac817d2bb --command "{\"Name\":\"deploy\", \"CustomJson\":{\"deploy\":{\"APPSHORTNAME\":{\"scm\":{\"revision\":\"MYBRANCHNAME\"}}}}}" | |
| The JSON structure you want to pass should look like this: | |
| { | |
| "deploy": { | |
| "MYAPPSHORTNAME": { | |
| "scm": { | |
| "revision": "MYGITBRANCH" |
This file contains hidden or 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
| #!/bin/bash | |
| (/usr/local/bin/db2log | \ | |
| mk-query-digest --fingerprints \ | |
| --filter '$event->{user} !~ m/^(bi|memonic)$/') 2>&1 | \ | |
| mail -s "MySQL slow logs" root | |
| # Rotate slow logs. Will move them into the backup table slow_log_backup. If | |
| # that table exists it's overwritten with the primary slow log. | |
| # So with this strategy we can still access yesterday's slow log by querying | |
| # slow_log_backup. |