GitLaboratory / demovibes

Automatically exported from code.google.com/p/demovibes
0 stars 0 forks source link

Ajax event monitor dies if one request fails #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. login
2. wait a long time

---What is the expected output? What do you see instead?
oneliner (and everything else) stops updating

Problem is that /static/js/dobject.js after being ported to jquery
no longer handle failed requests (that code was removed). We need to use
jquery's way of handling failed requests;

replace

   ajaxmonitorrequest=$.get(url,ajaxmonitorupdate);

with 

ajaxmonitorrequest=$.ajax({
    type: 'GET',
    dataType: 'text',
    url: url,
    timeout: 5000,
    success: function(data, textStatus ){
       ajaxmonitorupdate(data);
    },
    error: function(xhr, textStatus, errorThrown){
       setTimeout('ajaxmonitorspawn()',5000); // wait a bit on fail
    }
  });

Original issue reported on code.google.com by Fam.Stae...@gmail.com on 8 Jan 2010 at 9:23

GoogleCodeExporter commented 9 years ago

Original comment by ara...@gmail.com on 8 Jan 2010 at 10:26

GoogleCodeExporter commented 9 years ago
Fixed in r134. Thanks for the report.

Original comment by ara...@gmail.com on 8 Jan 2010 at 10:32