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
desc "retry all failed jobs and remove retried jobs" | |
task :retry_all => :environment do | |
# retry all jobs | |
Resque::Failure.all(0, Resque::Failure.count).each_with_index { |j, i| Resque::Failure.requeue(i) unless j['retried_at'] } | |
# remove all retried jobs | |
Resque::Failure.count.times { |i| Resque::Failure.remove(0) if Resque::Failure.all(0)['retried_at'] } | |
end |
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
module DSTCalculations | |
@@dst_years = [ | |
["4/3/1966", "10/30/1966"], | |
["4/2/1972", "10/29/1972"], | |
["4/1/1973", "10/28/1973"], | |
["4/7/1974", "10/27/1974"], | |
["4/6/1975", "10/26/1975"], | |
["4/4/1976", "10/31/1976"], | |
["4/3/1977", "10/30/1977"], |
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
CAS, CAS, CAS! |
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
/** | |
This groovy script will take a CSV file that represents the data | |
in a database. The first row should be the name of the columns and | |
all other rows should represent the data you wish to insert. | |
*/ | |
// Setup basic information | |
numColumns = 6 | |
tableName = "TABLE_NAME" |
NewerOlder