Use map.on() over map.once()

map.once() is eager and will serve empty/half-empty objects instead of
waiting for the entirety of data to be wired in.
This commit is contained in:
Daniel Lugo 2021-04-30 15:46:19 -04:00
parent 4460de0747
commit 785544c341

View file

@ -36,7 +36,7 @@ const onAcceptedRequests = (user, SEA) => {
user
.get(Key.STORED_REQS)
.map()
.once(async (storedReq, id) => {
.on(async (storedReq, id) => {
logger.info(
`------------------------------------\nPROCID:${procid} (used for debugging memory leaks in jobs)\n---------------------------------------`
)