I’m experimenting with a very simple worker which reads from
ir.queue and execute a task when they appear. Everything works but I never get data back after the task is finished.
The idea is that the worker sits between the queue and an external system. So when data is changed or added in Tryton, a new task is added to the queue which is picked up by the worker and processed. This processing it still a function in Tryton itself which is ok because it can build a meaningful JSON object. That JSON object can be returned back to the worker so the worker can use that to send it over to the other side to be processed there.
I got this working with putting the result of the
getattr in a variable and returning that variable at the end of the function ( trytond: 738c1d725255 trytond/ir/queue.py ).
Is this something anybody is interested in?