czue / celery-progress

Drop in, configurable, dependency-free progress bars for your Django/Celery applications.
MIT License
472 stars 90 forks source link

Periodic GET request occurs even after success! #14

Closed sindhujit closed 5 years ago

sindhujit commented 5 years ago

Is there a way to de-initialize the celery progress bar after everything is completed? My server constantly shows: [09/Sep/2019 21:20:23] "GET /celery_progress/task-id-stub/ HTTP/1.1" 200 54 [09/Sep/2019 21:20:24] "GET /celery_progress/task-id-stub/ HTTP/1.1" 200 54 [09/Sep/2019 21:20:25] "GET /celery_progress/task-id-stub/ HTTP/1.1" 200 54

I tried CeleryProgressBar.initProgressBar(''); but did not work.

czue commented 5 years ago

Are you sure the task is properly being marked as complete by celery? Just looking at the URLs being hit, I suspect that you are not properly replacing task-id-stub with the actual ID of the task.

sindhujit commented 5 years ago

Never mind. I was creating 2 task URLs:- [10/Sep/2019 07:34:57] "GET /celery_progress/296e3c05-524d-4235-93b6-37a4cdfa60f0/ HTTP/1.1" 200 98 [10/Sep/2019 07:34:57] "GET /celery_progress/task-id-stub/ HTTP/1.1" 200 54