Ryan Roemer 0a11e7e6ae
Chore: Various plugin refactoring and simplification. (#332)
Refactors the plugin internal logic to be a lot simpler. 

- Chore: Refactor internal stats consumption to perform `inspectpack` analysis in the main thread, without using `main` streams. Originally, the `inspectpack` engine did some really heavy CPU stuff (gzipping lots of files), but now the actions are super fast, so I've removed `most` async observables and just switched to straight promises.
- Chore: Refactor internal handler in plugin to always be a wrapped function so that we can't accidentally have asynchronous code call the handler function after it is removed / nulled.
- Bugfix: Add message counting delayed cleanup in plugin to allow messages to drain in Dashboard. The issue seems to be that we hit socket IO disconnect in the plugin before the dashboard actually processes the messages. Fixes #294.
2021-07-12 12:27:50 -07:00
..