From e514dfcf5049771af3901334e37b1a7c53e05452 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Wed, 24 Jul 2024 02:31:24 -0400 Subject: [PATCH] fix: prevent large logs from service events (2) --- src/backend/src/services/RegistryService.js | 8 ++------ src/backend/src/services/drivers/DriverService.js | 6 ++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/backend/src/services/RegistryService.js b/src/backend/src/services/RegistryService.js index 8d28b30b..789e5ecb 100644 --- a/src/backend/src/services/RegistryService.js +++ b/src/backend/src/services/RegistryService.js @@ -68,12 +68,8 @@ class RegistryService extends BaseService { async ['__on_boot.consolidation'] () { const services = this.services; - await services.emit('registry.collections', { - svc_registry: this, - }); - await services.emit('registry.entries', { - svc_registry: this, - }); + await services.emit('registry.collections'); + await services.emit('registry.entries'); } register_collection (name) { diff --git a/src/backend/src/services/drivers/DriverService.js b/src/backend/src/services/drivers/DriverService.js index 0562860d..03a99b9d 100644 --- a/src/backend/src/services/drivers/DriverService.js +++ b/src/backend/src/services/drivers/DriverService.js @@ -37,12 +37,14 @@ class DriverService extends BaseService { this.interface_to_implementation = {}; } - async ['__on_registry.collections'] (_, { svc_registry }) { + async ['__on_registry.collections'] () { + const svc_registry = this.services.get('registry'); svc_registry.register_collection('interfaces'); svc_registry.register_collection('drivers'); } - async ['__on_registry.entries'] (_, { svc_registry }) { + async ['__on_registry.entries'] () { const services = this.services; + const svc_registry = services.get('registry'); const col_interfaces = svc_registry.get('interfaces'); const col_drivers = svc_registry.get('drivers'); {