Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def poll_forever(self):
while True:
try:
self.poll()
except Exception as e:
logger.error("Encountered error during polling!")
logger.error(e, exc_info=True)
time.sleep(1)