lib/sensu/client/process.rb
# Pause the Sensu client process, unless it is being paused or
# has already been paused. The process/daemon `@state` is first
# set to `:pausing`, to indicate that it's in progress. All run
# timers are cancelled, and the references are cleared. The
# Sensu client will unsubscribe from all transport
# subscriptions, then set the process/daemon `@state` to
# `:paused`.
Pause the Sensu client process, unless it is being paused or
has already been paused. The process/daemon `@state` is first
set to `:pausing`, to indicate that it's in progress. All run
timers are cancelled, and the references are cleared. The
Sensu client will unsubscribe from all transport
subscriptions, then set the process/daemon `@state` to
`:paused`.
Pause the Sensu client process unless it is being paused or has already been paused . The process / daemon ` @state ` is first set to ` : pausing ` to indicate that it ' s in progress . All run timers are cancelled and the references are cleared . The Sensu client will unsubscribe from all transport subscriptions then set the process / daemon ` @state ` to ` : paused ` .
def pause
        unless @state == :pausing || @state == :paused
          @state = :pausing
          @timers[:run].each do |timer|
            timer.cancel
          end
          @timers[:run].clear
          @transport.unsubscribe if @transport
          @state = :paused
        end
      end
def pause unless @state == :pausing || @state == :paused @state = :pausing @timers [ :run ] . each do | timer | timer . cancel end @timers [ :run ] . clear @transport . unsubscribe if @transport @state = :paused end end
Pause the Sensu client process, unless it is being paused or
has already been paused.
Pause the Sensu client process unless it is being paused or has already been paused .