Skip to content

Commit b9ec6a1

Browse files
committed
feat: use duplicate subscribe as no-op:wq
1 parent 35a93c2 commit b9ec6a1

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/placeos-driver/subscriptions.cr

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ class PlaceOS::Driver
156156
while details = subscription_channel.receive?
157157
sub, chan = details
158158

159-
if chan == "ping"
160-
redis.ping
161-
next
162-
end
163-
164159
begin
165160
SimpleRetry.try_to(
166161
max_attempts: 4,
@@ -188,11 +183,10 @@ class PlaceOS::Driver
188183
spawn(same_thread: true) do
189184
instance = monitor_count
190185
wait.close
191-
sleep 10.seconds
192186
loop do
193187
sleep 1.second
194188
break if instance != monitor_count
195-
subscription_channel.send({true, "ping"}) rescue nil
189+
subscription_channel.send({true, SYSTEM_ORDER_UPDATE}) rescue nil
196190
end
197191
end
198192
end

0 commit comments

Comments
 (0)