diff --git a/bin/insert_event.py b/bin/insert_event.py index fd3e022..ebade30 100755 --- a/bin/insert_event.py +++ b/bin/insert_event.py @@ -38,11 +38,11 @@ if __name__ == '__main__': message = " ".join(args["remarks"]) - print("new event:", schema, tstamp, message) + print("new event:", schema, tstamp, message, args["label"]) if schema and tstamp and message: db.set_survey(schema) with db.conn.cursor() as cursor: - qry = "INSERT INTO events_timed (tstamp, remarks) VALUES (%s, %s);" - cursor.execute(qry, (tstamp, message)) + qry = "INSERT INTO event_log (tstamp, remarks, labels) VALUES (%s, replace_placeholders(%s, %s, NULL, NULL), %s);" + cursor.execute(qry, (tstamp, message, tstamp, args["label"])) db.maybe_commit()