From 54472cba3e1847961cb39963c2977dcc032749fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=99=93=E6=B5=A9?= <1923911906@qq.com> Date: Tue, 4 Jun 2024 11:37:32 +0800 Subject: [PATCH] fix: exportCurrentUser --- packages/web-chat-x-vue/src/classes/DatabaseManager.ts | 6 ++++-- prometheus/prometheus.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/web-chat-x-vue/src/classes/DatabaseManager.ts b/packages/web-chat-x-vue/src/classes/DatabaseManager.ts index 4e3e25b..368b822 100644 --- a/packages/web-chat-x-vue/src/classes/DatabaseManager.ts +++ b/packages/web-chat-x-vue/src/classes/DatabaseManager.ts @@ -233,11 +233,13 @@ export class DatabaseManager { exportCurrentUserDB = async () => { try { const blobs = [] as Array; - const activatedUserDb = await exportDB(this.activatedUserDb); + const currentUser = await this.getCurrentUserInfo(); + const activatedUserDb = await this.exportDatabase( + "webChatX@" + currentUser.id + ); // const publicDb = await exportDB(this.publicDb); // blobs.push(activatedUserDb, publicDb); blobs.push(activatedUserDb); - const currentUser = await this.getCurrentUserInfo(); const combinedBlob = await this.combineMultipleBlobs(blobs); const file = new File( [combinedBlob], diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 7be53a0..c6f3d61 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -26,6 +26,6 @@ scrape_configs: - targets: ["web-chat-x-express:8099"] # 实际的 libp2p 节点指标端口 metrics_path: /metrics - - job_name: "webRTC" + - job_name: "webrtc-internals-exporter" static_configs: - targets: ["pushgateway:9091"]