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 cursor = r.db(database).table(table).run(conn)
# Load Configuration # ------------------------------------------------------------------ if len(sys.argv) != 2: print("Hey, thats not how you launch this...") print("%s <config file>") % sys.argv[0] sys.exit(1) configfile = sys.argv[1] with open(configfile, 'r') as cfh: config = yaml.safe_load(cfh) # Open Config File and Parse Config Data db=RunbookDB(configfile) conn=db.connect() # Open External Connections # ------------------------------------------------------------------ # RethinkDB Server # Helper Functions # ------------------------------------------------------------------ # Execute # ------------------------------------------------------------------ @full_profile