I have setup a multi-threaded environment with nginx and gunicorn. But since gunicorn does not run openerp-cron-workers, I need to start dedicated cron-workers.
As far as I understand I have to run the "oe cron" command. But for this command there are only two options available: "--addons" and "--database". When I call this command I get an exception because the PostgreSQL port is not correct.
So how can I specify configuration options (or a config file) for the "oe" command? What is the correct way to run cron-worker jobs in a productive environment?
I run gunicorn with the following command: "gunicorn openerp:wsgi.wsgi_server.application -c ../gunicorn.conf.py"
Here is my guniconf.conf.py file:
import openerp import multiprocessing bind = '0.0.0.0:8000' pidfile = '.gunicorn.pid' conf = openerp.tools.config conf['addons_path'] = "openerp/addons,../addons,../web/addons,../custom-addons" conf['db_host'] = False conf['db_port'] = 5433 conf['db_user'] = 'user1' conf['db_password'] = 'xx' conf['dbfilter'] = 'test.*' conf['logfile'] = '/var/log/openerp-server-7.log' workers = multiprocessing.cpu_count() * 2 + 1
When I look into the source in method "application" of wsgi_server.py I cannot see where the cron jobs will be started. There are only 2 files which handle "max_cron_threads": "server/openerp/service/workers.py" and "server/openerp/service/cron.py". Both of them are not called in gunicorn-mode.
Maybe I misunderstand something. How to I correctly run openerp in multiprocess-mode?