from runbookdb import RunbookDB if len(sys.argv) != 2: print("Hey, thats not how you launch this...") print("%s <config file>") % sys.argv[0] sys.exit(1) # Open Config File and Parse Config Data configfile = sys.argv[1] with open(configfile, "r") as cfh: config = yaml.safe_load(cfh) # Establish Connection database = config['rethink_db'] db = RunbookDB(configfile) conn = db.connect() tables = [ "users", "reactions", "monitors", "dc1queue", "dc2queue", "events", "history", "subscription_history", ] for table in tables: print "==========TABLE %s" % table