[chronojump-server] Adds machine_id in the ping tables.



commit 487ac671ccd5560134938436bd57a9f469fff3e7
Author: Carles Pina i Estany <carles pina cat>
Date:   Tue Feb 17 22:45:24 2015 +0000

    Adds machine_id in the ping tables.

 main.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/main.py b/main.py
index 26e6a34..134824c 100755
--- a/main.py
+++ b/main.py
@@ -83,11 +83,13 @@ def ping():
 
     cj_version = content.get('cj_version', 'unknown')
     os_version = content.get('os_version', 'linux')
+    machine_id = content.get('machine_id', 0)
+
     ip = request.remote_addr
 
     (con, cur) = connect_db()
 
-    cur.execute("INSERT INTO ping (cjVersion, osVersion, ip) VALUES (%s, %s, %s)", (cj_version, os_version, 
ip))
+    cur.execute("INSERT INTO ping (cjVersion, osVersion, ip, machineId) VALUES (%s, %s, %s, %s)", 
(cj_version, os_version, ip, machine_id))
     con.commit()
 
     return Response("", 201)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]