fix
This commit is contained in:
parent
8e4a8b2a2a
commit
bc7d586c8a
1 changed files with 8 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ export class TlvStorageFactory extends EventEmitter {
|
||||||
private debug: boolean = false;
|
private debug: boolean = false;
|
||||||
private _nostrSend: NostrSend = () => { throw new Error('nostr send not initialized yet') }
|
private _nostrSend: NostrSend = () => { throw new Error('nostr send not initialized yet') }
|
||||||
private allowResetMetricsStorages: boolean
|
private allowResetMetricsStorages: boolean
|
||||||
log = getLogger({component: 'TlvStorageFactory'})
|
log = getLogger({ component: 'TlvStorageFactory' })
|
||||||
constructor(allowResetMetricsStorages: boolean) {
|
constructor(allowResetMetricsStorages: boolean) {
|
||||||
super();
|
super();
|
||||||
this.allowResetMetricsStorages = allowResetMetricsStorages
|
this.allowResetMetricsStorages = allowResetMetricsStorages
|
||||||
|
|
@ -134,10 +134,15 @@ export class TlvStorageFactory extends EventEmitter {
|
||||||
return this.handleOp<Types.WebRtcAnswer>(op)
|
return this.handleOp<Types.WebRtcAnswer>(op)
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessMetrics(metrics: ProcessMetrics, processName: string): Promise<void> {
|
async ProcessMetrics(metrics: ProcessMetrics, processName: string): Promise<void> {
|
||||||
const opId = Math.random().toString()
|
const opId = Math.random().toString()
|
||||||
const op: ProcessMetricsTlvOperation = { type: 'processMetrics', opId, metrics, processName }
|
const op: ProcessMetricsTlvOperation = { type: 'processMetrics', opId, metrics, processName }
|
||||||
|
try {
|
||||||
return this.handleOp<void>(op)
|
return this.handleOp<void>(op)
|
||||||
|
} catch (error: any) {
|
||||||
|
this.log(ERROR, 'Error processing metrics', error.message)
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue