From 1e9303ee903e8a14b816e59d4e2ed1cafe1588af Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Thu, 21 Nov 2019 17:01:13 +0000 Subject: [PATCH] Added taskStarted and finished events --- src/components/genericComponents/taskSubmitter.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/genericComponents/taskSubmitter.vue b/src/components/genericComponents/taskSubmitter.vue index 404263f6..4a26a46f 100644 --- a/src/components/genericComponents/taskSubmitter.vue +++ b/src/components/genericComponents/taskSubmitter.vue @@ -130,6 +130,7 @@ export default { this.taskId = response.data.id; // Start the store polling TaskId for success this.taskRunning = true; + this.$emit("taskStarted", this.taskId); // Return the poll-task promise (starts polling the task) return this.pollTask( this.taskId, @@ -141,6 +142,7 @@ export default { // Do something with the final response console.log("Emitting onResponse: ", response); this.$emit("response", response); + this.$emit("finished"); }) .catch(error => { if (!error) { @@ -148,6 +150,7 @@ export default { } console.log("Emitting onError: ", error); this.$emit("error", error); + this.$emit("finished"); }) .finally(() => { console.log("Cleaning up after task.");