lib/resque/worker.rb
def kill_child
      if @child
        log! "Killing child at #{@child}"
        if system("ps -o pid,state -p #{@child}")
          Process.kill("KILL", @child) rescue nil
        else
          log! "Child #{@child} not found, restarting."
          shutdown
        end
      elsif @cant_fork && @current_job
        raise Resque::DirtyExit, "Worker killed while processing job"
      end
    end
# Kills the forked child immediately, without remorse. The job it
# is processing will not be completed.
Kills the forked child immediately, without remorse. The job it
is processing will not be completed.
Kills the forked child immediately without remorse . The job it is processing will not be completed .
def kill_child
      if @child
        log! "Killing child at #{@child}"
        if system("ps -o pid,state -p #{@child}")
          Process.kill("KILL", @child) rescue nil
        else
          log! "Child #{@child} not found, restarting."
          shutdown
        end
      elsif @cant_fork && @current_job
        raise Resque::DirtyExit, "Worker killed while processing job"
      end
    end
def kill_child if @child log! "Killing child at #{@child}" if system ( "ps -o pid,state -p #{@child}" ) Process . kill ( "KILL" , @child ) rescue nil else log! "Child #{@child} not found, restarting." shutdown end elsif @cant_fork && @current_job raise Resque :: DirtyExit , "Worker killed while processing job" end end
Kills the forked child immediately, without remorse.
Kills the forked child immediately without remorse .