mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-13 15:14:49 -06:00
chore: Set the maximum number of listeners that can be registered for events
This commit is contained in:
parent
7ca9bff6e0
commit
1ded6c81ad
@ -16,6 +16,9 @@ LOG_COLOR=true
|
||||
# Log Baileys - "fatal" | "error" | "warn" | "info" | "debug" | "trace"
|
||||
LOG_BAILEYS=error
|
||||
|
||||
# Set the maximum number of listeners that can be registered for an event
|
||||
EVENT_EMITTER_MAX_LISTENERS=50
|
||||
|
||||
# Determine how long the instance should be deleted from memory in case of no connection.
|
||||
# Default time: 5 minutes
|
||||
# If you don't even want an expiration, enter the value false
|
||||
|
@ -3,6 +3,7 @@
|
||||
### Features
|
||||
|
||||
* Sync lost messages on chatwoot
|
||||
* Set the maximum number of listeners that can be registered for events
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
import EventEmitter2 from 'eventemitter2';
|
||||
|
||||
const maxListeners = parseInt(process.env.EVENT_EMITTER_MAX_LISTENERS, 10) || 50;
|
||||
|
||||
export const eventEmitter = new EventEmitter2({
|
||||
delimiter: '.',
|
||||
newListener: false,
|
||||
ignoreErrors: false,
|
||||
maxListeners: 50,
|
||||
maxListeners: maxListeners,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user