PolicyStat / jobtastic

Make your user-responsive long-running Celery jobs totally awesomer.
http://policystat.github.com/jobtastic/
MIT License
644 stars 61 forks source link

How do you handle POST -> REDIRECT -> GET sequence to pass task_id? #70

Closed gabn88 closed 8 years ago

gabn88 commented 8 years ago

It is generally considered good practise to use POST for data changing requests, which in my case is done in the task. Also I always try to REDIRECT after a POST to a GET, so that if the user clicks refresh, the same task wouldn't be started.

How do you handle this, in combination with passing around the task_id?

Do you also put the task_id in the session?

kylegibson commented 8 years ago

We pass the task ID around. This makes the URL unique, and allows the user to return to the URL later, or even share it, if they want. You could put the task ID in session storage.

gabn88 commented 8 years ago

okay, thank you!