Skip to content
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

enhance: Repo refactor #13

Merged
merged 3 commits into from
Oct 29, 2024
Merged

Conversation

LaurenceJJones
Copy link
Contributor

@LaurenceJJones LaurenceJJones commented Oct 22, 2024

This PR is just simple QOL and improve debugging by allowing either debug or gin debug flags to be given.

As with current debug stuff if you set gin debug or debug you would miss some debugging so now its a single variable.

This PR is now a refactoring of the repository to split code in multiple packages to not have a "single" package main that makes debugging stuff like leaks harder to trace since they all fall under "main".

TODO: currently when debug is enabled the route /api/push has been commented out temporarily since the pusher is now its own entity it does not access to controller, if we need to expose this we can pass the pusher instance to the controller, however, I want to ensure this debug route is useful enough to have to work round this.

@andrasbacsai
Copy link
Member

Thanks for the PR! I will take a look.

Btw, not related to this issue, but the latest next version has a potential memory leak problem. Before our changes, it used 18-20MB of RAM. Now it is growing and it is over 50MB.

This needs to be fixed, before the first release.

@LaurenceJJones
Copy link
Contributor Author

Hold fire merging this PR, I am using this branch for the project restructure also.

@LaurenceJJones
Copy link
Contributor Author

question: is /api/push actually useful to expose via the http server when in debug mode? cause of restructure its a little tricky to expose same functionality but can be done.

@LaurenceJJones LaurenceJJones changed the title enhance: Code qol and improve debug enhance: Repo refactor Oct 27, 2024
@LaurenceJJones
Copy link
Contributor Author

Note this is currently hard to test, so I'll let @andrasbacsai let me know if I wrecked it :D

@andrasbacsai
Copy link
Member

question: is /api/push actually useful to expose via the http server when in debug mode? cause of restructure its a little tricky to expose same functionality but can be done.

No, that endpoint was required for testing in the early stages. Now it is obsolete.

@LaurenceJJones
Copy link
Contributor Author

question: is /api/push actually useful to expose via the http server when in debug mode? cause of restructure its a little tricky to expose same functionality but can be done.

No, that endpoint was required for testing in the early stages. Now it is obsolete.

Awesome I can remove that when I get chance.

@andrasbacsai
Copy link
Member

question: is /api/push actually useful to expose via the http server when in debug mode? cause of restructure its a little tricky to expose same functionality but can be done.

No, that endpoint was required for testing in the early stages. Now it is obsolete.

Awesome I can remove that when I get chance.

I will remove it, because I also need to change a few things. Thanks for the refactor! It is huge!

@andrasbacsai andrasbacsai merged commit b618e06 into coollabsio:next Oct 29, 2024
1 check passed
@LaurenceJJones
Copy link
Contributor Author

I guess by the merge it works 😅

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