diff --git a/rffmpeg b/rffmpeg index 1a42450..9fa6c1a 100755 --- a/rffmpeg +++ b/rffmpeg @@ -240,7 +240,7 @@ def get_target_host(config): # Generate a mapping dictionary of hosts and processes host_mappings = dict() for host in hosts: - hid, hostname, weight = host + hid, hostname, weight, server_name = host # Get the latest state with dbconn(config) as cur: @@ -536,7 +536,7 @@ def run_control(config): try: with dbconn(config) as cur: cur.execute( - """CREATE TABLE hosts (id INTEGER PRIMARY KEY, hostname TEXT NOT NULL, weight INTEGER DEFAULT 1)""" + """CREATE TABLE hosts (id INTEGER PRIMARY KEY, hostname TEXT NOT NULL, weight INTEGER DEFAULT 1, server_name TEXT NOT NULL)""" ) cur.execute( """CREATE TABLE processes (id INTEGER PRIMARY KEY, host_id INTEGER, process_id INTEGER, cmd TEXT)""" @@ -590,7 +590,7 @@ def run_control(config): } for host in hosts: - hid, hostname, weight = host + hid, hostname, weight, server_name = host # Get the latest state with dbconn(config) as cur: @@ -705,7 +705,8 @@ def run_control(config): click.echo("Adding new host '{}'".format(host)) with dbconn(config) as cur: cur.execute( - """INSERT INTO hosts (hostname, weight) VALUES (?, ?)""", (host, weight) + "INSERT INTO hosts (hostname, weight, server_name) VALUES (?, ?, ?)", + (host, weight, "manual"), ) rffmpeg_click.add_command(rffmpeg_click_add)