Skip to content

Commit

Permalink
Retry fetching query result on failure (fixes #36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Short authored and jezdez committed Oct 31, 2018
1 parent 0658ebb commit 6cbd4cc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions client/app/services/query-result.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,16 @@ function QueryResultService($resource, $timeout, $q, QueryResultError) {
}
}, (error) => {
logger('Connection error', error);
// TODO: use QueryResultError, or better yet: exception/reject of promise.
this.update({ job: { error: 'failed communicating with server. Please check your Internet connection and try again.', status: 4 } });
this.update({
job: {
error: 'Failed communicating with server. Retrying...',
status: 4,
id: this.job.id,
},
});
$timeout(() => {
this.refreshStatus(query);
}, 3000);
});
}

Expand Down

0 comments on commit 6cbd4cc

Please sign in to comment.