mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-07 13:23:15 +00:00
Update server to log new server version field to telemetry db
This commit is contained in:
@@ -53,7 +53,7 @@ def v1_telemetry(telemetry_data: List[Dict[str, str]]):
|
|||||||
# Log telemetry data
|
# Log telemetry data
|
||||||
for item in telemetry_data:
|
for item in telemetry_data:
|
||||||
cur.execute(
|
cur.execute(
|
||||||
"INSERT INTO usage (time, type, server_id, os, api, client) VALUES (?, ?, ?, ?, ?, ?)",
|
"INSERT INTO usage (time, type, server_id, os, api, client, server_version) VALUES (?, ?, ?, ?, ?, ?, ?)",
|
||||||
(
|
(
|
||||||
item["timestamp"],
|
item["timestamp"],
|
||||||
item["telemetry_type"],
|
item["telemetry_type"],
|
||||||
@@ -61,6 +61,7 @@ def v1_telemetry(telemetry_data: List[Dict[str, str]]):
|
|||||||
item["os"],
|
item["os"],
|
||||||
item.get("api"),
|
item.get("api"),
|
||||||
item.get("client"),
|
item.get("client"),
|
||||||
|
item.get("server_version", None),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
# Commit the changes
|
# Commit the changes
|
||||||
|
|||||||
Reference in New Issue
Block a user