Community archivi mailing list
Naviga tra gli archivi
Re: Odoo Connector VS Celery (Rabbit MQ or Redis)da
Pedro M. Baeza
That difference is only on the way you deploy your server, not on the way you program how to enqueue jobs. Check documentation about how to start the server with job runners (you need an environment variable).Regards.
2016-02-05 17:52 GMT+01:00 Kitti U. <firstname.lastname@example.org>:
Hi Leonardo & Pedro,Thanks for the answer. The account_move_batch_validate is easy to follow :)It is using the job concept, right? It seem from the documentation that Job is the recommended over worker process.But it Job can not be real time, is it? (as it is en queue by another scheduler job and fastest is 1 min).Thank you,On Fri, Feb 5, 2016 at 10:08 PM, Pedro Manuel Baeza Romero <email@example.com> wrote:You have a simpler example in https://github.com/OCA/account-financial-tools/tree/8.0/account_move_batch_validate or my module in PR: https://github.com/OCA/bank-payment/pull/226Regards.2016-02-05 15:52 GMT+01:00 Leonardo Pistone <firstname.lastname@example.org>:Hi Kitti, On Fri, Feb 5, 2016 at 2:46 PM, Kitti U. <email@example.com> wrote: > You means, if a job (i.e., create a new record for a model) failed and roll > back, that job will never be executed again? Is it possible that we program > it so that it keep trying for N attempt? Guewen is talking about the creation, not the execution of jobs. If you have a big method that creates a few jobs and has an error, the creation of the jobs is rolled back. Retrying failed jobs is something else, and it is supported indeed. > And as you used to try Celery before, but then, why you come to create your > own MQ system? Celery is not suitable for the work? Guewen was indeed an answer to that already :) - transactional job creation - easy integration of the interface in odoo so for example you can inspect the jobs in the interface which is nice - a lot of work has been done already. A dedicated worker like rabbitmq (so something like celery) is indeed desirable if you have huge amounts of jobs. For the loads we face usually the OCA connector + postgres setup works just fine. > And lastly, can you shed some light how to start coding with Connector. I > read the code in Magento-Connect, and frankly quite confused. See odoo-connector.com for documentation. The magento connector is indeed something of a reference implementation, although bear in mind that it does much more than just a job queue. It works well to use only the job queue part without the full e-commerce framework if that's what you need. On the other hand with celery you have a (nice, mind you) job queue, and you have to start from there and roll your own stuff. Leonardo--