def find_changes(accounts, monitor_names, debug=True):
 for account_name in accounts:
  monitors = get_monitors(account_name, monitor_names, debug)
  for mon in monitors:
   cw = mon.watcher
   (items, exception_map) = cw.slurp()
   cw.find_changes(current=items, exception_map=exception_map)
   cw.save()
 audit_changes(accounts, monitor_names, False, debug)
 db.session.close()

def find_changes ( accounts , monitor_names , debug = True ) : for account_name in accounts : monitors = get_monitors ( account_name , monitor_names , debug ) for mon in monitors : cw = mon . watcher ( items , exception_map ) = cw . slurp ( ) cw . find_changes ( current = items , exception_map = exception_map ) cw . save ( ) audit_changes ( accounts , monitor_names , False , debug ) db . session . close ( )
runs watchers .