MurLock: A distributed locking solution for NestJS, providing a decorator for critical sections with Redis-based synchronization. Ideal for microservices and scalable applications.
The MurlockService is registred twice (https://github.com/felanios/murlock/blob/master/lib/murlock.module.ts#L29-L36) and this makes the onModuleInit and onApplicationShutdown be triggered twice. Since the onApplicationShutdown tries to close Redis twice (with the same instance) the last one creates an error that breaks the tests.
The MurlockService is registred twice (https://github.com/felanios/murlock/blob/master/lib/murlock.module.ts#L29-L36) and this makes the
onModuleInit
andonApplicationShutdown
be triggered twice. Since theonApplicationShutdown
tries to close Redis twice (with the same instance) the last one creates an error that breaks the tests.