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: Introduce queue based live stat refresh #1059

Merged
merged 2 commits into from
Dec 5, 2022
Merged

feat: Introduce queue based live stat refresh #1059

merged 2 commits into from
Dec 5, 2022

Conversation

keriati
Copy link
Collaborator

@keriati keriati commented Dec 4, 2022

Goals:

  • Reduce the update interval of the tiles in general to avoid increased server load.
  • More reliable way to suspend and resume updates.
  • Limit the number of active requests to 1 / sec even if a lot of live tiles are added.
  • Remove jquery dependency

Queue feature:

  • A queue is created that is processing live stat refresh jobs every 1 second
  • update jobs are adding themselves to the queue
  • successful jobs are adding themselves back to the queue
  • failing jobs are not added back to the queue
  • when the window visibility changes to hidden the queue is suspended
  • when the window visibility changes to not hidden the queue is resumed
  • at page load all jobs are executed instantly 1 time

Intervals:

  • jobs with dataonly attribute: 30 sec always
  • jobs with that are reported active: 5 sec
  • jobs that are not active: 30 sec

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.

2 participants