-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Description
I had an issue while diplaying the progress bar in HTML for a bunch of tasks which was being initiated in a loop. While the CeleryProgressBar was initiated for all the tasks, the progress was only being updated for the last task in the loop.
For a quick fix I had to create a function updateElements everytime before onProgress was called.
updateElements(){
this.progressBarElement = document.getElementById(this.progressBarElement.getAttribute('id'))
this.progressBarMessageElement = document.getElementById(this.progressBarMessageElement.getAttribute('id'))
}
onData(data) {
let done = false;
if (data.progress) {
this.updateElements()
this.onProgress(this.progressBarElement, this.progressBarMessageElement, data.progress);
}
........
}
This solved my issue but would like to know if there is a better solution
Metadata
Metadata
Assignees
Labels
No labels