I’am using jasper with task_subscribe event and for each report request i create a room with a new task_id, when the report is ready jasper emit to that room the message. That room will not be used any more.

My question is: why there isn’t unsubscribe_task event to leave the rooms that aren’t used any more?


@luisfmfernandes You can add the unsubscribe_task code similar to the doc_unsubscribe code. :smile:

We have made async tasks which we had into sync tasks, as there were some problems and we didn’t have any time to spare on debugging it. So async hasn’t got much of our attention lately.

Hi @anand.
Thanks for your answer.
Already done, task_unsubscribe Event. #1556.

In my opinion socketio task events are very important to let some libraries, like jasper, to connect with server outside of frappe world and after that when answer arrive to notify clients which are waiting for reply.

But to use task events i have to add a little uuid.js. Others if they also want to generate uuids will add their. So in my opinion frappe team should add a way to generate, from javascript, some kind of uuid. Maybe, uuid.js.


Why do you need UUID?

In Jasper for each report request it is generated an uuid (any thing that is unique). And with that uuid Jasper subscribes to task event. When the report is ready, Jasper write to that room (task with uuid) to inform javascript clients.