Commit Graph

7 Commits

Author SHA1 Message Date
Xavier ALT 6e3464a8b2 [MERGE] cron: use multi-process signaling + add openerp-cron-worker helper script
bzr revid: xal@openerp.com-20120530081258-35p658buwgz0d0a7
2012-05-30 10:12:58 +02:00
Vo Minh Thu d94b776f0c [IMP] cron: use multi-process signaling.
bzr revid: vmt@openerp.com-20120402120158-m3m4s67pjueemane
2012-04-02 14:01:58 +02:00
Vo Minh Thu ea6184d3d5 [IMP] cron: re-use the rlimits (used with Gunicorn) with the cron processes.
bzr revid: vmt@openerp.com-20120330103459-mj7it2zucpiwlc8d
2012-03-30 12:34:59 +02:00
Vo Minh Thu c3503add6e [IMP] cron: re-added the threaded cron:
- the new process workers implementation is present along the old one
- new code impacts minimally the old one: just one flag is added to
schedule_wakeup().

bzr revid: vmt@openerp.com-20120329115531-9mbh4mtvktyyi9bv
2012-03-29 13:55:31 +02:00
Vo Minh Thu 7a901e8216 [IMP] cron: the db_names to monitor can be a callable.
bzr revid: vmt@openerp.com-20120329091846-6t1ofh57d6ldlwky
2012-03-29 11:18:46 +02:00
Vo Minh Thu 18de40b351 [IMP] cron: added signal handler for Ctrl-C.
bzr revid: vmt@openerp.com-20120328115109-9offjmjqzq6w9k6q
2012-03-28 13:51:09 +02:00
Vo Minh Thu 1b0bfd1044 [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
2012-03-28 11:03:20 +02:00