Skip to content

Commit

Permalink
add debug threads
Browse files Browse the repository at this point in the history
  • Loading branch information
golanha committed May 19, 2024
1 parent 93c3282 commit 026dee8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hkube_python_wrapper/wrapper/algorunner.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import print_function, division, absolute_import

import threading
import time

from hkube_python_wrapper.util.DaemonThread import DaemonThread
Expand Down Expand Up @@ -50,6 +51,7 @@ def __init__(self):
self._runningStartThread = None
self._stopped = False
self._redirectLogs = False
self._printThread = 0
DaemonThread.__init__(self, "WorkerListener")

@staticmethod
Expand Down Expand Up @@ -349,6 +351,12 @@ def _discovery_update(self, discovery):

def _setupStreamingProducer(self, nodeName):
def onStatistics(statistics):
thread_list = ""
self._printThread = self._printThread + 1
for thread in threading.enumerate():
thread_list = thread_list + " " + str(thread.name)
if (self._printThread % 30 == 0):
log.debug("thread list: " + thread_list)
self._sendCommand(messages.outgoing.streamingStatistics, statistics)

producerConfig = {}
Expand Down

0 comments on commit 026dee8

Please sign in to comment.