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
envelope_balance = | |
EnvelopeTransaction.where( | |
:destination => [self]).sum(:amount) - | |
EnvelopeTransaction.where( | |
:source_type => envelope, | |
:source_id => [self]).sum(:amount) |
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
% RAILS_ENV=production rake middleware | |
use ActionDispatch::Static | |
use Rack::Lock | |
use ActiveSupport::Cache::Strategy::LocalCache | |
use Rack::Runtime | |
use Rails::Rack::Logger | |
use ActionDispatch::ShowExceptions | |
use ActionDispatch::RemoteIp | |
use Rack::Sendfile | |
use ActionDispatch::Callbacks |
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 Resque | |
... | |
class Worker | |
... | |
def perform(job) | |
begin | |
run_hook :after_fork, job | |
job.perform | |
rescue Object => e | |
break if e.is_a?(Resque::DirtyExit) # This is the line I added. |
NewerOlder