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

init v2 chat #467

Draft
wants to merge 80 commits into
base: master
Choose a base branch
from
Draft

init v2 chat #467

wants to merge 80 commits into from

Conversation

Geczy
Copy link
Member

@Geczy Geczy commented Nov 18, 2024

twitch conduits with websocket shards
removes webhooks server

…dy construction in subscribeChatMessagesForUser
…several packages including @supabase/supabase-js, @twurple/eventsub-base, i18next, and others for improved functionality and security.
…nce subscription handling in subscribeChatMessagesForUser by initializing broadcaster entries and storing subscription details more clearly.
…and deleteSubscription function; enhance fetchExistingSubscriptions to identify subscriptions for cleanup and log deletion attempts.
Geczy added 2 commits December 8, 2024 19:39
Maintains a queue of tasks
Tracks rate limit information from Twitch's response headers
Automatically delays requests when rate limits are hit
Processes tasks in order while respecting rate limits
Update the subscription functions to:
Use the rate limiter for all API calls
Update rate limit information from response headers
Handle 429 responses properly
Process subscriptions in chunks to avoid overwhelming the rate limiter
Add proper error handling and retries for rate-limited requests
The rate limiter will automatically queue requests and wait when necessary to stay within Twitch's rate limits. It also updates its internal limits based on the headers returned by Twitch, ensuring accurate rate limiting.
…ope for improved account retrieval in Twitch events.
Geczy added 3 commits December 8, 2024 19:56
…filtering, improving account retrieval accuracy in Twitch events.
…tilizing the new rate limiter for API calls. This change enhances the subscription cleanup process by processing deletions in manageable chunks, preventing overwhelming the Twitch API and improving error handling during subscription deletions.
…improving rate limiter functionality. The deletion of subscriptions is now tracked in chunks with detailed logging of progress every 100 deletions. Additionally, the RateLimiter class has been updated to include queue length and rate limit status logging, providing better insights into the rate limiting process during API calls.
…d to track remaining requests accurately. Update processQueue to reset remaining count when the reset period has passed. Additionally, add a TODO comment in subscribeChatMessagesForUser.ts to mark users requiring refresh after subscription failures.
… logging. The GSIHandler now emits an 'enable' event with the channel ID when enabling, while toggleDotabod simplifies the enabling/disabling logic and enhances logging for better traceability. Additionally, added progress logging in fetchExistingSubscriptions to monitor account processing and rate limit status.
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.

1 participant