Skip to content

Commit b8f6b2c

Browse files
committed
feat: add more logging
1 parent dde6ea2 commit b8f6b2c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/placeos-driver/subscriptions.cr

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,16 @@ class PlaceOS::Driver
173173
# requires a block and subsequent ones throw an error with a block.
174174
# NOTE:: this version of subscribe only supports splat arguments
175175
redis.subscribe(SYSTEM_ORDER_UPDATE) do |on|
176+
monitor_count += 1
176177
on.message { |c, m| on_message(c, m) }
177178
spawn(same_thread: true) do
178179
instance = monitor_count
179180
wait.close
181+
puts "\n\n\nNEW SUBSCRIPTION LOOP!!!! #{monitor_count}\n\n\n"
180182
loop do
181183
sleep 1.second
184+
puts "PING SUBSCRIPTION REDIS: #{monitor_count} == #{instance}"
182185
break if instance != monitor_count
183-
puts "PING SUBSCRIPTION REDIS"
184186
subscription_channel.send({true, SYSTEM_ORDER_UPDATE})
185187
rescue error
186188
puts "\n\nERROR PINGING REDIS: #{error.inspect_with_backtrace}\n\n"

0 commit comments

Comments
 (0)