Skip to content

[Bug] Polling Frequency - Going Live Function Compromised #12

@dan-mcm

Description

@dan-mcm

The getStreams endpoint used for getting the time a streamer went live has some inconsistencies - tbd if this is on the API end or the logic currently on the API.

This endpoint returns a UTC timestamp started_at which is comapred against a Date.now() timestamp, and logic is in place to get the differential in minutes i,e, stream started 2 minutes ago.

Initially the twitch polling frequency was set to 1 minute, but logs have never indicated a minute difference of < 1, which leads to believe that its not until streams are live for 1minute before the timestamp is received.

This is problematic as if we are polling at 60 second intervals, we need to ensure that we're using a threshold thats relevant enough, consider if were checking the endpoint every minute, we cant have the threshold < 1minute as the API does not seem to return values for that period, so at best it much be > 1 but < 2.

If polling at a threshold of < 3 this breaks as a value can log at say 1.1 & 2.1 and thus the entry will be posted twice (an internal caching system could prevent this).

Initally trying out at a fix of an adjusted threshold of 3 minutes with the polling frequency set to the same - will review logs to see if this fixes the issue. It will lead to delayed going live notifications, so will have to be tightened up, but it seems the 1-2 minute threshold is problematic with the minute differential.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions