Fix memory leak and clean up duplicate REST client #30

Open
phil wants to merge 3 commits from fix/refactor into main
Owner

TLDR;
Small refactors that improve memory usage and code cleanliness without changing behavior.

Created a shared REST module to avoid duplicate Discord API clients.
Cached WebhookClients in bridge handler to prevent memory bloat.
Removed the unbounded Set that was tracking recent messages.
Added better error logging for guild events and command registration.

@ElZeckos Test before merging this PR to main and release it.

TLDR; Small refactors that improve memory usage and code cleanliness without changing behavior. Created a shared REST module to avoid duplicate Discord API clients. Cached WebhookClients in bridge handler to prevent memory bloat. Removed the unbounded Set that was tracking recent messages. Added better error logging for guild events and command registration. @ElZeckos Test before merging this PR to main and release it.
fix/refactor critical/medium issues
All checks were successful
ci/woodpecker/push/check Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
e1aba0e2eb
Typo: Dockerfile
All checks were successful
ci/woodpecker/push/check Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
d1b4405ba4
docs: trim bloated readme
All checks were successful
ci/woodpecker/push/check Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
af57d8a6f4
All checks were successful
ci/woodpecker/push/check Pipeline was successful
ci/woodpecker/pr/check Pipeline was successful
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/refactor:fix/refactor
git switch fix/refactor

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/refactor
git switch fix/refactor
git rebase main
git switch main
git merge --ff-only fix/refactor
git switch fix/refactor
git rebase main
git switch main
git merge --no-ff fix/refactor
git switch main
git merge --squash fix/refactor
git switch main
git merge --ff-only fix/refactor
git switch main
git merge fix/refactor
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ElZeckos/Temp-Voice-URC!30
No description provided.