twitch-notifier icon indicating copy to clipboard operation
twitch-notifier copied to clipboard

feat: message queue

Open danluki opened this issue 2 years ago • 0 comments

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

  • Prepare production backup
  • Implement #106
  • Fix vendor folder
  • More, what we will decide to do

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 avatar Nov 11 '23 14:11 danluki