mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-03 02:45:21 +03:00
feat(server): kick off telemetry
This commit is contained in:
parent
5061cac591
commit
40069ab5f0
@ -31,8 +31,8 @@ LEON_HTTP_API_KEY=
|
|||||||
# Language used for the HTTP API
|
# Language used for the HTTP API
|
||||||
LEON_HTTP_API_LANG=en-US
|
LEON_HTTP_API_LANG=en-US
|
||||||
|
|
||||||
# Enable/disable collaborative logger
|
# Enable/disable telemetry
|
||||||
LEON_LOGGER=true
|
LEON_TELEMETRY=true
|
||||||
|
|
||||||
# Python TCP server
|
# Python TCP server
|
||||||
LEON_PY_TCP_SERVER_HOST=0.0.0.0
|
LEON_PY_TCP_SERVER_HOST=0.0.0.0
|
||||||
|
10
server/src/telemetry.ts
Normal file
10
server/src/telemetry.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const IS_TELEMETRY_ENABLED = process.env['LEON_TELEMETRY'] === 'true'
|
||||||
|
const INSTANCE_ID = '' // TODO: read from file (leon.json > instanceID)
|
||||||
|
|
||||||
|
export class Telemetry {
|
||||||
|
public static send(): void {
|
||||||
|
if (IS_TELEMETRY_ENABLED) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user