Skip to content

Lazily initialize cluster event listeners - #159

Merged
SimenB merged 4 commits into
prometheus:masterfrom
zbjornson:lazy-event
Oct 15, 2017
Merged

SimenB merged 4 commits into
prometheus:masterfrom
zbjornson:lazy-event

Conversation

@zbjornson

@zbjornson zbjornson commented Oct 12, 2017 •

Copy link
Copy Markdown
Contributor

Sorry for the delay, forgot about this. Small change aside from indenting (try ignoring whitespace).

Fixes #155

@SimenB SimenB left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

Could you add a test as well? Just require this file and assert that process.listenerCount('message') is 0? Or a jest.resetModules() thrown in in the old tests with an assertion on listenerCount before and after to see that it doesn't go up

https://nodejs.org/api/events.html#events_emitter_listenercount_eventname

@SimenB

SimenB commented Oct 15, 2017

Copy link
Copy Markdown
Contributor

Thanks! (I just added a test myself)

@SimenB
SimenB merged commit b82035f into prometheus:master Oct 15, 2017
@SimenB

SimenB commented Oct 15, 2017

Copy link
Copy Markdown
Contributor

Released as 10.2.0

@zbjornson

Copy link
Copy Markdown
Contributor Author

Thanks, sorry for being slow.

@zbjornson
zbjornson deleted the lazy-event branch October 16, 2017 23:20
@SimenB

SimenB commented Oct 17, 2017

Copy link
Copy Markdown
Contributor

No worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants