What is the best way to implement listening thread?

0
I am integrating with a PaaS. I submit a request to PaaS to execute an action and receive back a URL which I should be periodically checking to get the completion status. The process typically takes up to a minute to complete, and I would like to check on its status every 10 seconds. Needless to say that in a multi user environment there might be plenty of requests like this happening at any moment of time. What is the best way to implement the listening process?   I tried using task queue and simply fail a task with a 10 seconds retry while PaaS is still processing the request. Unfortunately, it seems like parameter values are lost when I retry a failed task. Any ideas to help me out? 
asked
1 answers
0

I got myself an answer. It is totally ok to submit a task into a task queue with multiple parameters. However, if the task fails and I have retry policy, not all parameters are re-populated. I changed the signature of my task to accept a single string argument (it is JSON with plenty of information) and retry of the task started to work as expected.

answered