def main_loop(options, modules, sender, tags):
 next_heartbeat = int((time.time() + 600))
 while ALIVE:
  populate_collectors(options.cdir)
  reload_changed_config_modules(modules, options, sender, tags)
  reap_children()
  check_children(options)
  spawn_children()
  time.sleep(15)
  now = int(time.time())
  if (now >= next_heartbeat):
   LOG.info(('Heartbeat (%d collectors running)' % sum((1 for col in all_living_collectors()))))
   next_heartbeat = (now + 600)

def main_loop ( options , modules , sender , tags ) : next_heartbeat = int ( ( time . time ( ) + 600 ) ) while ALIVE : populate_collectors ( options . cdir ) reload_changed_config_modules ( modules , options , sender , tags ) reap_children ( ) check_children ( options ) spawn_children ( ) time . sleep ( 15 ) now = int ( time . time ( ) ) if ( now >= next_heartbeat ) : LOG . info ( ( 'Heartbeat (%d collectors running)' % sum ( ( 1 for col in all_living_collectors ( ) ) ) ) ) next_heartbeat = ( now + 600 )
main processing loop .