Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 683b12c

Browse files
fix: revert wrong change, change telemetry server url
1 parent febf4d8 commit 683b12c

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

cortex-js/src/infrastructure/constants/cortex.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ export const CORTEX_ENGINE_RELEASES_URL = (engine: string) =>
4848
export const CUDA_DOWNLOAD_URL =
4949
'https://catalog.jan.ai/dist/cuda-dependencies/<version>/<platform>/cuda.tar.gz';
5050

51-
export const telemetryServerUrl = 'http://192.168.100.30:1338';
51+
export const telemetryServerUrl = 'https://telemetry.jan.ai';

cortex-js/src/infrastructure/controllers/models.controller.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,14 @@ export class ModelsController {
115115
},
116116
],
117117
})
118-
@Get('download/:modelId(*)')
119-
async downloadModel(@Param('modelId') modelId: string) {
120-
await this.modelsUsecases.pullModel(modelId, false);
121118

122-
123-
this.telemetryUsecases.addEventToQueue({
119+
@Get('download/:modelId(*)')
120+
downloadModel(@Param('modelId') modelId: string) {
121+
this.modelsUsecases.pullModel(modelId, false).then(() => this.telemetryUsecases.addEventToQueue({
124122
name: EventName.DOWNLOAD_MODEL,
125123
modelId,
126-
});
124+
})
125+
);
127126
return {
128127
message: 'Download model started successfully.',
129128
};
@@ -163,12 +162,12 @@ export class ModelsController {
163162
description: 'The unique identifier of the model.',
164163
})
165164
@Get('pull/:modelId(*)')
166-
async pullModel(@Param('modelId') modelId: string) {
167-
await this.modelsUsecases.pullModel(modelId);
168-
this.telemetryUsecases.addEventToQueue({
165+
pullModel(@Param('modelId') modelId: string) {
166+
this.modelsUsecases.pullModel(modelId).then(() => this.telemetryUsecases.addEventToQueue({
169167
name: EventName.DOWNLOAD_MODEL,
170168
modelId,
171-
});
169+
})
170+
);
172171
return {
173172
message: 'Download model started successfully.',
174173
};

0 commit comments

Comments
 (0)