Commit Graph

52 Commits

Author SHA1 Message Date
Christophe Simonis 78ea8eb058 [FIX] core: correcly handle pidfile deletion.
As atexit function are inherited by subprocess, the pidfile was always
deleted when the first worker (http or cron) died. Now, only the
process that created the pidfile will delete it.
2015-11-26 10:40:59 +01:00
Xavier Morel 68f14c6870 [FIX] handling of big fields in CSV
fixes #2742
2015-02-27 14:11:21 +01:00
Raphael Collet b8a0e65ed5 [FIX] cli/server: fixes #1307, add missing Environment management blocks 2014-07-30 15:32:12 +02:00
Fabien Meghazi 3458eb3ef7 Add docstring to help command 2014-05-27 17:07:40 +02:00
Christophe Simonis 156225f9ea [IMP] do not fail if cannot delete the pidfile. It may have a race-condition when in multi-workers.
bzr revid: chs@openerp.com-20140423150117-nyt16snzwvey2vz4
2014-04-23 17:01:17 +02:00
Raphael Collet 5640f3076a [MERGE] test_cursor: implement a cursor mockup that never commits to database, and use it for http tests
bzr revid: rco@openerp.com-20140409145830-rop8esgic2y435kf
2014-04-09 16:58:30 +02:00
Raphael Collet e5e00e4c0a [IMP] registry: now cursor() simply returns a cursor, which may itself be used as a context manager
bzr revid: rco@openerp.com-20140409095604-joh9dt0qkma12ykm
2014-04-09 11:56:04 +02:00
Raphael Collet 6bc60505f4 [IMP] registry: add method get_cursor() to simply retrieve a new cursor, and refactor code to use it
bzr revid: rco@openerp.com-20140408125122-ki0zmin3m21k2itd
2014-04-08 14:51:22 +02:00
Christophe Simonis 0161666e8b [MERGE] forward port of branch saas-3 up to revid 5112 chs@openerp.com-20140407144238-3s38zadkh7yxpdy7
bzr revid: chs@openerp.com-20140407160548-ttuc877kknuycoqw
2014-04-07 18:05:48 +02:00
Christophe Simonis 4335ff0712 [FIX] force suppression of pidfile at exit of openerp.
[IMP] only write/delete pidfile in non-evented mode
[FIX] check if evented mode before checking in worker mode when starting server service

bzr revid: chs@openerp.com-20140404154658-6x5rxyq12guej43q
2014-04-04 17:46:58 +02:00
Denis Ledoux b9d9e781d5 [MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 4955.1.67 revid:dle@openerp.com-20140326092548-bu4bqinhvco8j5wj
bzr revid: dle@openerp.com-20140326093011-pwhsfeippg4cgodj
2014-03-26 10:30:11 +01:00
Christophe Simonis 1c3ee251f0 [MERGE] forward port of branch 7.0 up to revid 5270 chs@openerp.com-20140403084524-9rb174osjrbmhgwc
bzr revid: chs@openerp.com-20140402083506-w4cywcf0kxxx9xmk
bzr revid: chs@openerp.com-20140312174526-a5rhh83g0fw8djuc
bzr revid: chs@openerp.com-20140318105837-53vsx5g7fm517cuc
bzr revid: dle@openerp.com-20140326092548-bu4bqinhvco8j5wj
bzr revid: chs@openerp.com-20140402092735-3a23yjl169vvt0iv
bzr revid: chs@openerp.com-20140402112825-ky8rcb3p467ikitc
bzr revid: chs@openerp.com-20140403084808-slnj7uis17kwi9js
2014-04-03 10:48:08 +02:00
Christophe Simonis 5b2634bd6e [FIX] init logger earlier, right after config loading
bzr revid: chs@openerp.com-20140325154627-cmodvx26jayj3k4a
2014-03-25 16:46:27 +01:00
Kersten Jeremy 903270996f [FIX] Fix the yml test with option --test-file.
1 -
There was a confusing between kind and mode.
Due to the mode 'test', there are many part of code who was not executed.
The right value is kind='test', and arbitrary mode='init' (or 'update')

2 -
The yml test was always roolbacked, without check that command line had '--test-commit'.
It's has been fixed, now we check if param --test-commit is existing, else we roolback the transaction.

Rem for forward: function in trunk=saas-4 has been moved in : openerp/service/server.py - def load_test_file_yml

bzr revid: jke@openerp.com-20140319104847-6r2c70gapocn2wxq
2014-03-19 11:48:47 +01:00
Antony Lesuisse 38d1ca1ff2 [MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
2014-02-27 17:18:19 +01:00
Antony Lesuisse 002ac937c1 add python --test-file support
bzr revid: al@openerp.com-20140209014636-2fbl15q8wrubmiup
2014-02-09 02:46:36 +01:00
Antony Lesuisse 278ed718e9 new test execution engine
remove deprecated zipfile support
add preload_registry option when server is running
allow registries to be used in contruction in test mode
add a rollback test case for http tests
add a phantomjs helper

bzr revid: al@openerp.com-20140209004005-p5pwym4sqc23vw5b
2014-02-09 01:40:05 +01:00
Christophe Simonis 5269664102 [FIX] correct uses of addons_path
bzr revid: chs@openerp.com-20140115180313-pqcrfmstci2w21y8
2014-01-15 19:03:13 +01:00
Stephane Wirtel 552c76c8b2 [REF] Use the contextlib.closing function instead of a couple of try/catch for
the release of the database cursor.

bzr revid: stw@openerp.com-20140109093258-vmr1a3gaxruo0psp
2014-01-09 10:32:58 +01:00
Christophe Simonis ab386c0f5f [MERGE] forward port of branch saas-2 up to revid 4984 chs@openerp.com-20131125151017-lmj53bxg1pfrr4a7
bzr revid: chs@openerp.com-20131125154140-cpbk4tcdml2a3b9n
2013-11-25 16:41:40 +01:00
Christophe Simonis 33ce0e73db [FIX] When running with --stop-after-init, return code must be not null if any failure happen.
bzr revid: chs@openerp.com-20131118132235-84u5hfccm784ge5l
2013-11-18 14:22:35 +01:00
Christophe Simonis 86fea1e176 [IMP] always dumps threads, even in evented mode
bzr revid: chs@openerp.com-20131108175224-tztp2w83vfw9yetz
2013-11-08 18:52:24 +01:00
Christophe Simonis 44eab2cfed [IMP] dumpstack dumps greenlets when running in evented mode
bzr revid: chs@openerp.com-20131107163419-90pd7uai8fm70sv9
2013-11-07 17:34:19 +01:00
Antony Lesuisse d2eb959710 [FIX] ensure the use the registry signaling for registries loaded with -d
bzr revid: al@openerp.com-20131013021322-5ej7ovpcrf7ilnn5
2013-10-13 04:13:22 +02:00
Antony Lesuisse e6b18fc7aa rename server
bzr revid: al@openerp.com-20131005221829-a18vx5ag6ef4ufee
2013-10-06 00:18:29 +02:00
Antony Lesuisse 12580e690a [IMP] openerp threaded, gevent, prefork service cleanup
- unify signal handling
- unify start and stop
no new feature yet, it paves the way for
- developement mode auto reload
- graceful restart on HUP
- multiprocessing and gevent on windows

bzr revid: al@openerp.com-20130908173535-xomt5w7xmqtwkmyy
2013-09-08 19:35:35 +02:00
Christophe Simonis 3b36a3ea12 [FIX] watch parent when run in evented mode
bzr revid: chs@openerp.com-20130610160711-xvnmonm59al7e89l
2013-06-10 18:07:11 +02:00
niv-openerp 5d5cca0041 First version, does not close correctly
bzr revid: nicolas.vanhoren@openerp.com-20130606123733-j6d2lpcgrvxfa7yr
2013-06-06 14:37:33 +02:00
Thibault Delavallée 1d5068b63e [FORWARD] Forward port of server 7.0 until revision 4988
bzr revid: tde@openerp.com-20130528102733-bsszxp6nvy8yws3t
2013-05-28 12:27:33 +02:00
Martin Trigaux 8ecd022348 [IMP] clean permissions and shebang in files
bzr revid: mat@openerp.com-20130514103333-puuj4kmxq3bwzwec
2013-05-14 12:33:33 +02:00
Christophe Simonis 2c4e370b76 [FIX] When using "--stop-after-init", set the return code correctly. A non zero return code reflect the number of databases that fail to load/update
bzr revid: chs@openerp.com-20130506103054-kb91drgkbj3z5799
2013-05-06 12:30:54 +02:00
Vo Minh Thu 307ca374d6 [MERGE] forward merge 7.0 until revision 4919.
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Vo Minh Thu 684bd35442 [REF] registry: begin to remove openerp.pooler:
- call openerp.modules.registry.RegistryManager instead
- expose openerp.get_pool()

bzr revid: vmt@openerp.com-20130327093125-iqsyvvjm0ej7do14
2013-03-27 10:31:25 +01:00
niv-openerp 7010e8543e Merge Thu branch
bzr revid: nicolas.vanhoren@openerp.com-20130129150525-bcbh9b5jp8l2yath
2013-01-29 16:05:25 +01:00
niv-openerp 613775dd41 merge trunk
bzr revid: nicolas.vanhoren@openerp.com-20130128105556-cxifj7m5zpay4bmv
2013-01-28 11:55:56 +01:00
Vo Minh Thu 8a27967525 [IMP] oe web: handle SIGINT and somewhat SIGTERM for the gevent case.
bzr revid: vmt@openerp.com-20130121153540-wnlnz7u8ypwg165i
2013-01-21 16:35:40 +01:00
Vo Minh Thu ed0a292f5d [IMP] gevent: no longer a command-line flag (always used in multi-process, never otherwise)
The internal flag is in openerp.__init__ (as the multi_process flag).

bzr revid: vmt@openerp.com-20130118152511-57u4gxyolz0hd4y8
2013-01-18 16:25:11 +01:00
niv-openerp 4db73a4c7c merge trunk
bzr revid: nicolas.vanhoren@openerp.com-20130108090624-cubi563m34f1j6ab
2013-01-08 10:06:24 +01:00
Olivier Dony 4fd1bc7b3c [IMP] cron: remove useless pooljobs and schedule_cron_jobs methods
The pooljobs and scheduled_cron_jobs stuff was only used to
delay the processing of cron jobs until after the registry
was fully loaded. However this is already the case because
RegistryManager.new() only sets the flag at the end of the
init step.
The flag was named `registry.cron` but simply meant that the
registry was fully loaded and ready, so it is simpler to
rename it to `registry.ready`.

In multiprocess mode this flag is enterily irrelevant
so there is no need to selectively set it to True or
False. `registry.ready` is simpler.

bzr revid: odo@openerp.com-20121221133751-h4x670vblfr3d09e
2012-12-21 14:37:51 +01:00
Olivier Dony 2839f96ffa [FIX] cli.server: cron startup was incorrectly disabled by rev 4672.3.1
Rev. 4672.3.1 = revid:vmt@openerp.com-20121211105954-lwgs5js7yw3tzghs

bzr revid: odo@openerp.com-20121221102855-0ljpeoanyoxyfnjc
2012-12-21 11:28:55 +01:00
Vo Minh Thu 4a77c6a0c5 [FIX] timezone: under windows os.environ["TZ"] was not affecting the server,
now it does (probably because we make sure to first set the environment
*then* import the time module. Works fine under Windows XP.

lp bug: https://launchpad.net/bugs/1038017 fixed

bzr revid: vmt@openerp.com-20130307121637-47fac72clykizlnj
2013-03-07 13:16:37 +01:00
Vo Minh Thu cdfdaa455d [FIX] babel: the babel localedata was put back to its right place in the previous commit, so the zip-related hack can disappear.
bzr revid: vmt@openerp.com-20130306143317-oo4n6x78v68rqn9i
2013-03-06 15:33:17 +01:00
Christophe Simonis 0c7f17c0ac merge upstream
bzr revid: chs@openerp.com-20121217172614-3z1pstu5th26wuuc
2012-12-17 18:26:14 +01:00
Antony Lesuisse 14ad37779c cleanups
bzr revid: al@openerp.com-20121216015214-kfo6zlarh4gdccrx
2012-12-16 02:52:14 +01:00
Vo Minh Thu f668a123d9 [IMP] Reduce considerably the loading time of a new registry.
Loading time was mesured on the loading of a second database (identical to the
first one), i.e. by passing -d xx,yy on the command line, using cProfile. The
databases were installed with sale, mrp, and the crm.

The cProfile code is commited as part of this patch and should be removed (or
maybe guarded by some command-line flag) (just as the commenting-out of the
cron startup).

The patch was also applied on top of the trunk-simple-table-stats-vmt branch
which provides SQL queries counters.

Results indicate that the number of SQL queries are reduced from about 2100 to
27. Loading time is reduced from 1.3s to 0.26s (i.e. improved by 5).

Changes:

All calls to ir_model_fields to fetch manual (custom) fields are done in a
single call (prior to instanciate all models).

Checks for empty module descriptions are not done unless we are in init or
update mode. (The behavior was the opposite, which was probably a mistake).

Some calls to ir_translation, passing en_US because there was no lang in the
context, are not done anymore.

The improved time is also a result of a change in the decimal_precision module
where precision_get fetches all digits/applications instead of one at a time
(and thus implements its own caching instead of relying on
openerp.tools.ormache).

bzr revid: vmt@openerp.com-20121211105954-lwgs5js7yw3tzghs
2012-12-11 11:59:54 +01:00
Christophe Simonis 69d057efc5 merge upstream
bzr revid: chs@openerp.com-20121201003326-j6n5r8juz16752j5
bzr revid: chs@openerp.com-20121204165557-u1oxocye3la4r6gf
bzr revid: chs@openerp.com-20121205143722-olswf8gsg8mhref3
2012-12-05 15:37:22 +01:00
niv-openerp 13d385fd6d merge trunk
bzr revid: nicolas.vanhoren@openerp.com-20121130095319-19yuk44djj2h20m4
2012-11-30 10:53:19 +01:00
Vo Minh Thu 001c451608 [REV] reverted install-all commit (vmt@openerp.com-20121128142106-pdkcruhyz0sjltk8)
bzr revid: vmt@openerp.com-20121129140745-wn2o9ek3beuf7y3y
2012-11-29 15:07:45 +01:00
Christophe Simonis a208447a3d merge upstream
bzr revid: chs@openerp.com-20121128184100-rkr90mrx38fh9q4l
2012-11-28 19:41:00 +01:00
Christophe Simonis 10697d1c1e merge upstream
bzr revid: chs@openerp.com-20121128135442-nt2dv11726odr2ji
2012-11-28 14:54:42 +01:00