capping pending retries at 10

This commit is contained in:
Jared Tabor 2016-07-11 11:15:38 -07:00
parent 148b59d628
commit 999c3d8292

View File

@ -148,7 +148,7 @@ export default
scope.testNotification = function(){
var name = $filter('sanitize')(this.notification_template.name),
pending_count = 10;
pending_retries = 10;
Rest.setUrl(defaultUrl + this.notification_template.id +'/test/');
Rest.post({})
@ -191,8 +191,8 @@ export default
});
Wait('stop');
}
else if(res && res.data && res.data.status && res.data.status === "pending" && pending_count>0){
pending_count--;
else if(res && res.data && res.data.status && res.data.status === "pending" && pending_retries>0){
pending_retries--;
retrieveStatus(id);
}
else {