Get notified once ray is done

Hi All, is there a simple property or method where I can use to get notified when all ray remote processes are done.

I am returning a json object in my run() asynchronously to the client and ray starts doing it’s work but I would like to insert a record in db to track the process as “completed” once all the tasks are done. if anyone can point me to an example or reference it would be great.

hi @Arash_Mosharraf, if you know the last task suppose to be running you can either call ray.get(...) on that task; or pass it to another ray remote task which writes the result into db.

Thank you @Chen_Shen , yes I do but my API returns a runid asynchronously when the API is called and the ray process starts. if I do ray.get() then the function that returns the runid as as JSON object waits until ray.get() is retuned ( synchronously) . Perhaps, as you said I need to send it to another ray remote task to write it to a db.