def main daemonize daemonize while True try logging debug Starting new

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
def main():
daemonize.daemonize()
while True:
try:
logging.debug('Starting new cycle')
loop()
except:
logging.exception('main')
finally:
time.sleep(TimeOut)