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

Restructures & Improvements for Sugar. #9

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ShindouMihou
Copy link
Member

Admittedly, the prior code of sugar wasn't really the best, nor is it going to be the best right now, but this pull request should fix a lot of the issues and add some improvements, such as:

  • Freeing up event identifiers after it has really passed the maximum retry delay (2 days is the most delay when an event is retried).
  • More straightforward and cleaner naming (especially in functions).
  • Use of JSON Node methods over hardcoding JSON (resolved the BigInt issue).

There are no plans to adjust Sugar into a centralized subscriptions handler for now, as the only module it communicates with right now is Tea. Although, that might change in the future, for better maintenance right now, reducing the complexity to this much should be fine.

@ShindouMihou ShindouMihou added enhancement New feature or request sugar Related to Sugar labels Nov 23, 2023
@ShindouMihou ShindouMihou self-assigned this Nov 23, 2023
@ShindouMihou ShindouMihou marked this pull request as ready for review November 23, 2023 12:21
@ShindouMihou ShindouMihou changed the title [Sugar]: Code restructures and improvements. Restructures & Improvements for Sugar. Nov 23, 2023
Copy link
Member

@ayubun ayubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :D i have nits, but i just wanted to review cuz i'm a bit bored 😆

sugar/src/connections/express.ts Outdated Show resolved Hide resolved
sugar/src/connections/express.ts Outdated Show resolved Hide resolved
sugar/src/connections/kafka.ts Outdated Show resolved Hide resolved
sugar/src/index.ts Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice, is this for labs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were you the original author of these changes, or was it lyus? :o
whoever it was must really not like semicolons 😆

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally, Sugar was under Lyus, but I took over and basically did it from scratch. Hey, it's hard to write semicolons as someone who's been writing Kotlin for a long while now 😆 It doesn't help that Golang also doesn't use semicolons nor does JS/TS enforce it lel

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might just set up Prettier so that we don't have to worry about formatting lul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sugar Related to Sugar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants