Thanks.
Then, may I also assume that I could push jobs to a queue and decide
where/when to run all at once, and raise an error if something fails?
If I can do this at the right moment (say, at the ORM's commit time),
that would spare me the cost of multiple network connections, while
keeping the code pretty readable.
Lionel.
Le 19/02/2014 11:29, Guewen Baconnier a écrit :
Totally possible.
The connector is composed of many pieces, as a developer you do what
you want and can use a piece or another but not all of them if you want.
A job is a simple function decorated with @job [0]
Calling .delay() on a decorated function will push it as a job in the
queue. But calling the function directly will execute it
synchronously, because it's still a normal function. It means that
changing a @job function to be executed synchronously or
asynchronously is a 8 chars change.
[0]
http://openerp-connector.com/api/api_queue.html#connector.queue.job.job