[IMP] cron: alternative implementation:
- The previous implementation was optimized to make few queries to the database but needed to keep some internal state. - That state was updated whenever the ir_cron table was modified by the ORM (this works only when the cron and web processes/threads are inside a single OpenERP server instance). - The new implementation is instead polling the database. - This is deemed acceptable in `normal` situation (i.e. not a SaaS with thousand of databases). - This makes it possible to avoid sharing state or the use of IPC. - This makes it possible to add/remove additional worker processes, possibly on different machines. - The code of the older implementation is removed in this commit but will be added back in a later commit: this is the 6.1 stable branch and we don't want to change the existing installation, but simply provide a solution for those running OpenERP with Gunicorn (which uses processes for which no cron state were shared). bzr revid: vmt@openerp.com-20120328090320-vshsfv3gt1ck34s1
Showing
- openerp-cron-worker 22 additions, 0 deletionsopenerp-cron-worker
- openerp-server 0 additions, 3 deletionsopenerp-server
- openerp/addons/base/ir/ir_cron.py 29 additions, 69 deletionsopenerp/addons/base/ir/ir_cron.py
- openerp/cron.py 0 additions, 158 deletionsopenerp/cron.py
- openerp/modules/registry.py 0 additions, 15 deletionsopenerp/modules/registry.py
- openerp/service/__init__.py 1 addition, 8 deletionsopenerp/service/__init__.py
Loading
Please register or sign in to comment