Merge branch 'check-error-in-task-submitter-response' into 'master'
Move error handling for taskSubmitter See merge request openflexure/openflexure-microscope-server!138
This commit is contained in:
commit
515bee1422
1 changed files with 25 additions and 25 deletions
|
|
@ -175,19 +175,8 @@ export default {
|
|||
// Get the returned Task ID
|
||||
.then(response => {
|
||||
// Start the store polling TaskId for success
|
||||
this.startPolling(response.data.id, response.data.href);
|
||||
});
|
||||
},
|
||||
|
||||
startPolling: function(taskId, taskUrl) {
|
||||
if (this.taskRunning != true) {
|
||||
// Starts polling an existing Action task
|
||||
this.taskId = taskId;
|
||||
this.taskUrl = taskUrl;
|
||||
// Start the store polling TaskId for success
|
||||
this.taskRunning = true;
|
||||
this.$emit("taskRunning", this.taskId);
|
||||
this.pollTask(this.taskId, this.pollInterval)
|
||||
return this.startPolling(response.data.id, response.data.href);
|
||||
})
|
||||
.then(response => {
|
||||
// Do something with the final response
|
||||
|
||||
|
|
@ -211,6 +200,17 @@ export default {
|
|||
this.getFormData();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
startPolling: function(taskId, taskUrl) {
|
||||
if (this.taskRunning != true) {
|
||||
// Starts polling an existing Action task
|
||||
this.taskId = taskId;
|
||||
this.taskUrl = taskUrl;
|
||||
// Start the store polling TaskId for success
|
||||
this.taskRunning = true;
|
||||
this.$emit("taskRunning", this.taskId);
|
||||
return this.pollTask(this.taskId, this.pollInterval);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue