Module: SuperSpreader::StopSignal

Included in:
SchedulerJob
Defined in:
lib/super_spreader/stop_signal.rb

Instance Method Summary collapse

Instance Method Details

#go!Object



11
12
13
# File 'lib/super_spreader/stop_signal.rb', line 11

def go!
  redis.del(stop_key)
end

#stop!Object



7
8
9
# File 'lib/super_spreader/stop_signal.rb', line 7

def stop!
  redis.set(stop_key, true)
end

#stopped?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/super_spreader/stop_signal.rb', line 15

def stopped?
  redis.exists(stop_key).positive?
end