Greetings fellow developers, I am logging ticks by below method but ticks are getting stop rarely, I am logging at every ticks and checking kws.is_connected() every minute. ##code def on_ticks(ws, ticks): global count2 print(count2, "tick") ## stops randomly ticks_queue.put(ticks) # sending ticks for further processing count2 += 1 ##code while flag1: print(datetime.datetime.now(),": RUNNING", connections[0].is_connected()) sleep(60) ##code
Thanks @sujith. I tried many solutions. I thought of manually restart also, but Reactor won't be able to reinitiated. It seems there is no direct solution to restart manually for now as reactor is using twisted-internet library. For now, I have created a fork subprocess of my main thread. Main Thread will kill the subprocess if any disconnection/noTicksWithinMin then make fresh new connection to kite.
It seems there is no direct solution to restart manually for now as reactor is using twisted-internet library.
For now, I have created a fork subprocess of my main thread. Main Thread will kill the subprocess if any disconnection/noTicksWithinMin then make fresh new connection to kite.