Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

[modlog] Refactor modlog #7

Merged
merged 7 commits into from
Aug 12, 2017
Merged

[modlog] Refactor modlog #7

merged 7 commits into from
Aug 12, 2017

Conversation

b1naryth1ef
Copy link
Owner

@b1naryth1ef b1naryth1ef commented Jul 22, 2017

This PR completely refactors some components of the modlog to improve the code and allow for some planned upcoming additions/features.

Goals

Rework Debounces

Debounces previously where a clusterfuck, and forced a lot of complex logic and plugin-specific data to be handled with the modlog plugin itself. Generally this logic and data was better served and handled by external plugins. To resolve this issue debounces are now only considered a way to silence events emitted by the modlog plugin. All other modlog messages that contain metadata or require non-modlog logic should be emitted and handled by the plugin with context and information on that logic/metadata.

Modlog Pump Functionality/Performance

Previously the modlog pump was a very naive and simple implementation that was quickly whipped up to combat issues with huge event spikes. With some new features I've worked into disco the pump can now be intelligent about when requests are getting rate limited, and batching is much more efficient. I've also segmented the pump into its own module for readability sake.

This PR is actually relatively small at its heart, but ended up including some PEP8 and development workflow changes.

Instead of the JANK fucking system I built before, this uses the
responses we get from the API to determine when to start the quiescent
period. Should perform much better, and reduces a lot of ugly complexity
that I built into the previous version.
@b1naryth1ef b1naryth1ef removed the WIP label Aug 10, 2017
@b1naryth1ef b1naryth1ef merged commit 240e551 into master Aug 12, 2017
@b1naryth1ef b1naryth1ef deleted the refactor/modlog branch August 12, 2017 21:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant