Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #84 from eapowertools/reload-metrics-fix
Browse files Browse the repository at this point in the history
resolving issue in reload method for GMS related to qrs-interact Post…
  • Loading branch information
goldbergjeffrey authored Feb 13, 2017
2 parents 5566439 + 9e3e338 commit a231ed6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/reloadmetrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var reloadMetrics = {
var path = "/task/start/synchronous";
path += "?name=" + taskName;
logger.debug('reloadMetrics::PATH::' + path, { module: 'reloadmetrics' });
return qrsInteract.Post(path)
return qrsInteract.Post(path, '', 'json')
.then(function(result) {
var taskId = result.body.value;
if (typeof result.body == 'object') {
Expand All @@ -26,7 +26,7 @@ var reloadMetrics = {
//now that we are done, let's evaluate the result
if (error) {
logger.error('reloadMetrics::progressCheck::' + error, { module: 'reloadmetrics' });
reject(new Error(error));
reject(error);
} else {
logger.info('reloadMetrics::Task Complete::' + taskName, { module: 'reloadmetrics' });
var path2 = "/executionresult";
Expand All @@ -53,17 +53,17 @@ var reloadMetrics = {
})
.catch(function(error) {
logger.error('reloadMetrics::Task Failure::' + error, { module: 'reloadmetrics' });
reject(new Error(error));
reject(error);
});
}
});
} else {
logger.error('reloadMetrics::' + JSON.stringify(result.body), { module: 'reloadmetrics' });
reject(new Error(result));
reject(result);
}
})
.catch(function(error) {
reject(new Error(error));
reject(error);
});
})
.catch(function(error) {
Expand Down

0 comments on commit a231ed6

Please sign in to comment.