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
$filename(json,utf-8)'[' | |
$loop(%_filename_ext%) | |
{"composer": "%composer%", "artist": "%artist%", "trackname": "%title%"}, | |
$loopend() | |
']' |
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
# config/initializers/delayed_job_config.rb | |
module Delayed | |
module Backend | |
module Base | |
def invoke_job_with_deserialize_catch | |
begin | |
invoke_job_without_deserialize_catch | |
rescue Delayed::DeserializationError | |
Rails.logger.error "Record was deleted when job ran!" |
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
DB=sqlite3 ruby test/benchmark_test.rb | |
DB driver: sqlite3 | |
Using 1.9.2 AR 3.2.13 with sqlite3 | |
Loaded suite test/benchmark_test | |
Started | |
------------------------------------- | |
Time to populate 10,000,000 rows: 1102.7106530666351s | |
random(1), avg: 18.829100692272185s (55.41% faster) | |
random_by_id_shuffle(1), avg: 42.231236004829405s |