msr-consulting / exscalabar

User interface for the EXSCALABAR instrument.
http://www.msrconsults.com/ukmet-gh/exscalabar
1 stars 2 forks source link

setinterval() requests piling up in slow response #40

Closed lo-co closed 8 years ago

lo-co commented 9 years ago

Didn't realize this would happen, but apparently the setinterval() function will back up when the server responds too slow (i.e. when we are trying to push a lot of data over).

lo-co commented 9 years ago

Somehow we must use the promise to determine whether the function has returned or not...

https://docs.angularjs.org/api/ng/service/$q

lo-co commented 9 years ago

Fixed this by

  1. Adding a flag to indicate a call is out and
  2. Chaining the finally(function(){}) promise to $http

Needs testing with big data...