From 69c3c3f24d549e5516707328c0b566963b4c8314 Mon Sep 17 00:00:00 2001 From: Valentino Stoll Date: Tue, 13 Feb 2024 08:53:04 -0500 Subject: [PATCH] Deprecate SuperSpreader::StopSignal and related methods --- lib/super_spreader/stop_signal.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/super_spreader/stop_signal.rb b/lib/super_spreader/stop_signal.rb index c909cba..2aab821 100644 --- a/lib/super_spreader/stop_signal.rb +++ b/lib/super_spreader/stop_signal.rb @@ -3,15 +3,21 @@ require "redis" module SuperSpreader + # @deprecated Please use TrackBallast::StopSignal instead module StopSignal + # @deprecated Please use {TrackBallast::StopSignal.stop!} instead def stop! + warn "DEPRECATION WARNING: the class SuperSpreader::StopSignal is deprecated and will be removed in v1.0. " \ + "Use TrackBallast::StopSignal instead." redis.set(stop_key, true) end + # @deprecated Please use {TrackBallast::StopSignal.go!} instead def go! redis.del(stop_key) end + # @deprecated Please use {TrackBallast::StopSignal.stopped?} instead def stopped? redis.exists(stop_key).positive? end