in src/worker/exporters/base_exporter.py [0:0]
def loop(self):
'''Main work loop which should be called in main'''
global job_update
job_update = False
try:
while True:
if (job_update):
self.jobID_update()
job_update = False
try:
self.process()
except:
logging.exception('Error while processing metrics')
time.sleep(self.config['update_freq'])
if self.config['exit']:
logging.info('Received exit signal, shutting down ...')
self.cleanup()
break
except KeyboardInterrupt:
pass