-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/refactor: Collector/MessageCollector #65
Conversation
@@ -0,0 +1,65 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, why's this not in src/External
where all the other Queue classes are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this one is a really specific structure. But I think you are right and I'll implement a generic sorted array for this. And then I'll use that here instead of timeout queue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #69
this._preRun(options, resolve, reject); | ||
} ); | ||
|
||
return promise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't figure out the return type for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Promise<Map<K: String, V: T>>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It resolves with all collected elements
Fixed most of it except for TimeoutQueue in 420c313 |
* Enum documentation fixes * Lint types folder (soon) * Split typings * Codefactor * Removed unnecessary overload. Try and link #58 to PR? * Should fix CI * Reflect correction in 27d7d9c * Added library typings * Add rest of typings * Typo * Finished rest of library typings, bug fixes etc * Export file, bug fixes, typos etc * Typings change * Naming typos * Attempt 2 * b85c399, 22610d8 and df13457 reflections * b854f61 reflections * b8f415f reflections * 9139554 reflections * 7631742 reflections * b0563ac reflections * 95c586c reflections and bug fixes from previous commit * 6296f7c reflections * 21b3014 reflections * 21b3014 reflections * 38d7b34 reflections * Added WinstonLogger * Lint * Don't emit file outputs on tsc check * Add updateDBVal type * Changed name * Add path references * fix * Fix the damn CI * Correct path * 37a4838 and previous reflections * f0978c2 reflections * #64 reflections * Clear warnings from e69bf1c * 3ff2100 reflections * e5bcc33 reflections * Confirmed typo * #65 reflections * Rename * #67 reflections * Remove unused imports * Added Library selector postinstall script, needs testing * Remove language check/selection * Remove variable in global * Constant * Move to scripts folder * Exit process if CI detected * Add CI env vars * #69 reflections * Added name to dep install and test * Consistency * #72 reflections * Add first and sweep methods * Test something * Fix pathing * Trying something... * module declaration? * Fix typings * Return `this` where appropriate * Save json only if invalid config * Bump events to 13.9.2 * #70 reflections * #66 reflections * 0af8a88 reflections * #73 reflections * 061de33 reflections
PULL REQUEST
Overview
This PR introduce a new way to use and interact with Collectors.
The philosophy behind this is to reduce the amount of event listeners at the same time.
This refactor MessageCollector, Collectors in general and any generics class from these to be used as one instance, using the same listeners until all collectors ends.
This will reduce the potentially exponential amount of listeners that would be added at the same time, to the basics one.
One instance can be kept along the framework and be reused dynamically and easily.
This however still allows to create as many instance of Collectors as needed.
Finally this PR brings multi-lib support to Collectors.
Status
Semantic versioning classification