# Is the server running with gevent.
evented = False
-for i in sys.argv:
- if i.startswith('--gevent'):
- evented = True
- break
-
-if evented:
- import gevent.monkey
- gevent.monkey.patch_all()
- import psycogreen.gevent
- psycogreen.gevent.patch_psycopg()
# Make sure the OpenERP server runs in UTC. This is especially necessary
# under Windows as under Linux it seems the real import of time is
def long_polling_spawn(self):
nargs = stripped_sys_argv('--pidfile','--workers')
- nargs += ['--gevent']
+ cmd = nargs[0]
+ cmd = os.path.join(os.path.dirname(cmd), "openerp-gevent")
+ nargs[0] = cmd
popen = subprocess.Popen(nargs)
self.long_polling_pid = popen.pid
help="specify additional addons paths (separated by commas).",
action="callback", callback=self._check_addons_path, nargs=1, type="string")
group.add_option("--load", dest="server_wide_modules", help="Comma-separated list of server-wide modules default=web")
- group.add_option("--gevent", dest="gevent", action="store_true", my_default=False, help="Activate the GEvent mode, this also desactivate the cron.")
+ group.add_option("--dev", dest="dev", action="store_true", my_default=False, help="Activate the developer mode. (code and views auto-reload).")
parser.add_option_group(group)
# XML-RPC / HTTP
'list_db', 'xmlrpcs', 'proxy_mode',
'test_file', 'test_enable', 'test_commit', 'test_report_directory',
'osv_memory_count_limit', 'osv_memory_age_limit', 'max_cron_threads', 'unaccent',
- 'workers', 'limit_memory_hard', 'limit_memory_soft', 'limit_time_cpu', 'limit_time_real', 'limit_request', 'gevent'
+ 'workers', 'limit_memory_hard', 'limit_memory_soft', 'limit_time_cpu', 'limit_time_real', 'limit_request', 'dev'
]
for arg in keys: