Class: HotCell::Supervisor::Sweep

Inherits:
Struct
  • Object
show all
Includes:
Timed
Defined in:
lib/hot_cell/supervisor.rb

Overview

The one sweeper the supervisor runs at a time. Not a Child: it is dispatched no request, holds no slot and answers nobody, so none of busy?, retirement or the idle report applies to it. What it shares with a worker is the deadline, and that is Timed — the same measurement, the same latch, the same deadline value from the configuration, and the same kill.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Timed

#expires_at, #overdue?

Instance Attribute Details

#deadlineObject

Returns the value of attribute deadline

Returns:

  • the current value of deadline



134
135
136
# File 'lib/hot_cell/supervisor.rb', line 134

def deadline
  @deadline
end

#killed_forObject

Returns the value of attribute killed_for

Returns:

  • the current value of killed_for



134
135
136
# File 'lib/hot_cell/supervisor.rb', line 134

def killed_for
  @killed_for
end

#pidObject

Returns the value of attribute pid

Returns:

  • the current value of pid



134
135
136
# File 'lib/hot_cell/supervisor.rb', line 134

def pid
  @pid
end

#started_atObject

Returns the value of attribute started_at

Returns:

  • the current value of started_at



134
135
136
# File 'lib/hot_cell/supervisor.rb', line 134

def started_at
  @started_at
end

Instance Method Details

#timed?Boolean

Returns:



137
138
139
# File 'lib/hot_cell/supervisor.rb', line 137

def timed?
  killed_for.nil?
end