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

feat: message queue #114

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat: message queue #114

wants to merge 2 commits into from

Conversation

danluki
Copy link
Contributor

@danluki danluki commented Nov 11, 2023

This will be good beginning to fix #106

I decided to use asynq and Redis as message queue because of good performance, persistent, easy to implement retries with delay and nice router, plus it has support of unique task ids to remove duplicate messages, that might be good for feature use in simplifying twitch_streams_checker logic.

  • I have already use unique task id for ensure that no duplicates here.
  • Using json instead of gob in serializing MessageOptions.
  • By default it will try to resend message, if processor returns error 25 times with 20 sec delay what looks good for me.
  • Fix tests.
  • Tested it only for stream becomes online message.

There are what I think we should do before merge

So, I have questions about how I can check for preview available using twitch api. I need help with what method should I call and how I can call it with empty message. Because as I know it will return not 404 but 200 with some empty image.

Criticism and suggestions are welcome.

@danluki danluki changed the title (feat): message queue feat: message queue Nov 11, 2023
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.

Check for twitch preview avability before sending notification
1 participant