tobytwigger / laravel-job-status

The only Laravel job debugging tool you'll ever need
https://tobytwigger.github.io/laravel-job-status
MIT License
19 stars 1 forks source link

[Dashboard] Requests can stack up if response is slow #65

Closed tobytwigger closed 1 year ago

tobytwigger commented 1 year ago

Describe the bug Given the dashboard makes a request every couple of seconds in order to keep the data up to date, these requests can stack up if the response time is greater than 2 seconds.

As well as improving the response time in #63, we can make sure to cancel any old requests before making a new one, or just not make a new request if one is pending.

To Reproduce

  1. Go to the dashboard
  2. Throttle the request speed so the response takes over 2 seconds
  3. See the requests stack up

Expected behavior I expect only one request to be pending/in progress at a time.

Screenshots image