Module: Resqued

Defined in:
lib/resqued.rb,
lib/resqued/config.rb,
lib/resqued/daemon.rb,
lib/resqued/master.rb,
lib/resqued/sleepy.rb,
lib/resqued/worker.rb,
lib/resqued/backoff.rb,
lib/resqued/logging.rb,
lib/resqued/pidfile.rb,
lib/resqued/version.rb,
lib/resqued/listener.rb,
lib/resqued/test_case.rb,
lib/resqued/config/dsl.rb,
lib/resqued/config/base.rb,
lib/resqued/runtime_info.rb,
lib/resqued/config/worker.rb,
lib/resqued/listener_proxy.rb,
lib/resqued/procline_version.rb,
lib/resqued/config/after_fork.rb,
lib/resqued/config/before_fork.rb

Defined Under Namespace

Modules: Config, Logging, Pidfile, ProclineVersion, Sleepy, TestCase Classes: Backoff, Daemon, Listener, ListenerProxy, Master, RuntimeInfo, Worker

Constant Summary collapse

START_CTX =
{}
VERSION =
'0.8.5'

Class Method Summary collapse

Class Method Details

.capture_start_ctx!Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/resqued.rb', line 7

def self.capture_start_ctx!
  START_CTX['$0'] = $0.dup
  START_CTX['pwd'] =
    begin
      env_pwd = ENV["PWD"]
      env_pwd_stat = File.stat env_pwd
      dir_pwd_stat = File.stat Dir.pwd
      if env_pwd_stat.ino == dir_pwd_stat.ino && env_pwd_stat.dev == dir_pwd_stat.dev
        env_pwd
      else
        Dir.pwd
      end
    rescue
      Dir.pwd
    end
end