Commit Graph

34 Commits

Author SHA1 Message Date
Antony Lesuisse 42f292af93 cron cleanup, back to the Kernighan KISS roots 1min poll time, rely only on database, multiprocess/multiserver ready.
Nota: If we replace sequence signaling for cache invalidation with pg
listen/notify in the future, we will use the same mechanism for more accurate
cron timing.

bzr revid: al@openerp.com-20121209170447-zs0k3jazokylwvar
2012-12-09 18:04:47 +01:00
Antony Lesuisse 3d2a09a973 multiprocessing signaling manually backported from 6.1
bzr revid: al@openerp.com-20121208181151-lfy956ysnok5b5hf
2012-12-08 19:11:51 +01:00
Vo Minh Thu 38336593f7 [IMP] registry: the `assertion_report` is now a registry attribute.
This allow us to report failure or success by inspecting the registry.

bzr revid: vmt@openerp.com-20121102134732-5uy1vp59mp1bxgjs
2012-11-02 14:47:32 +01:00
Christophe Simonis 3e251640d2 [IMP] add cursor() contextmanager on registry
bzr revid: chs@openerp.com-20120813150501-txkrphi7hyp2tgl1
2012-08-13 17:05:01 +02:00
Olivier Dony 2126f83a35 [IMP] modules, ir.ui.view: improve view validation + avoid validation errors during updates
As of 7.0, RNG validation is not possible for form views
that have a version attribute equal to "7.0", due to the
allowed usage of HTML syntax mixed with the regular OpenERP
view syntax. RNG validation is still enabled for regular
form views (@version missing or less than "7.0"), and for
all other views types.
Validation of 7.0 form views should be improved with the
addition of an assertion-based schema, still to be done.
 
The above is also complemented with an explicit call to fields_view_get()
during view installation, in order to immediately verify
that the updated view hierarchy does not cause any
issue when loaded along with its related views (i.e
parent and siblings, for inheriting views).
In addition to that, fields_view_get() will now only
consider loading views that belong to modules that have
already been loaded. This avoids a lot of validation errors
during a module update operation, which runs on top of
an existing database with all previous views visible,
even those whose module is not loaded yet.

bzr revid: odo@openerp.com-20120611122758-qcw9xdhupl24busq
2012-06-11 14:27:58 +02:00
Vo Minh Thu f22f2fc770 [IMP] openerp.{modules,osv}: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124124252-91g3ysf33zsq4nhd
2012-01-24 13:42:52 +01:00
Xavier Morel 6d70751dd7 [FIX] deadlock between crons scheduling and new registry initialization creation
bzr revid: xmo@openerp.com-20110930150026-m0h99fqk6qgne8i1
2011-09-30 17:00:26 +02:00
Olivier Dony f5fdb9f494 [FIX] cron/registry: typo
bzr revid: odo@openerp.com-20110928235048-ssfqeu7ug35isyfk
2011-09-29 01:50:48 +02:00
Olivier Dony f2b9b58fd3 [IMP] cron: misc renaming and minor changes to improve reviewability ;-)
bzr revid: odo@openerp.com-20110928224429-up0k4ts3cdks1u2s
2011-09-29 00:44:29 +02:00
Olivier Dony e7601e68cb [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110928211326-0e51q7zlw4h2528z
2011-09-28 23:13:26 +02:00
Olivier Dony 209390d627 [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110927165133-uwl7px6bxl6eu7us
2011-09-27 18:51:33 +02:00
Antony Lesuisse 7a88d9058d [MERGE] trunk
bzr revid: al@openerp.com-20110924145258-16r9qi7hr3dip1jz
2011-09-24 16:52:58 +02:00
Olivier Dony 0d3085d14f [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110922154155-jq811w768d9zfgim
2011-09-22 17:41:55 +02:00
Olivier Dony 6e4a93cd22 [MERGE] sync w/ latest trunk
bzr revid: odo@openerp.com-20110921162128-22sp59cn4xv983q5
2011-09-21 18:21:28 +02:00
Xavier Morel 556a17d5bc [FIX] race condition in RegistryManager
When two requests arrive simultanously for the same uninitialized db,
the first request starts the db initialization, but the second one
immediately gets the partially uninitialized registry (actually just
created, so generally completely uninitialized), leading to an access
error in later code (as soon as a registry object is accessed).

Add a GRML (Global RegistryManager Lock) to ensure the RegistryManager
*never* returns a partially initialized registry.

The current implementation is simple (just lock all RegistryManager
methods before they manipulate registries), but overly broad. This is
an area which might be optimizable if there are perf/responsivity
issues (e.g. each Registry instance could have a lock, and the
RegistryManager would grab the instance's, allowing the inititlization
of registry A not to block registry B from being returned in heavily
concurrent uses).

However this is not an issue in multiprocessing scenarios, which are
being planned for the near future. So for now, being correct is
probably the best idea.

bzr revid: xmo@openerp.com-20110916075227-0zutzlxn2dcd94c4
2011-09-16 09:52:27 +02:00
Vo Minh Thu 79d0e39c4c [FIX] loading: load base only once.
bzr revid: vmt@openerp.com-20110902132712-j9bgfnzbmddarr7h
2011-09-02 15:27:12 +02:00
Vo Minh Thu b8a633e578 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110831091325-t5gfm57tmkr0fbee
2011-08-31 11:13:25 +02:00
Vo Minh Thu 2e7927331d [FIX] registry: forgot the self/cls args.
bzr revid: vmt@openerp.com-20110831075639-0ywrg01e6zdff7l7
2011-08-31 09:56:39 +02:00
Vo Minh Thu bdd0c7cf3f [IMP] simplified cache implementation (and stored on the osv), does not support contexts.
bzr revid: vmt@openerp.com-20110830121541-abov2wezdn6kl2dc
2011-08-30 14:15:41 +02:00
Olivier Dony 3f00bfc405 [FIX] registry: use a unique list of models to load per module
This is necessary to preserve the model loading order
as defined in the module. This was broken when the 
metaclass was introduced to make the explicit model
constructor call optional.
One consequence is that the order in which the classes
are declared in the module really defines their
initialization order, even if the constructors are 
later called explcitly in a different order.
This latter case should be fairly rare, and easy to
fix too - simply putting the class declaration in the
right order.

bzr revid: odo@openerp.com-20110826161736-lgnpurtbcqtbseey
2011-08-26 18:17:36 +02:00
Vo Minh Thu dad3528ab7 [FIX] registry.py: typos (invalid syntax).
I wonder how come I made the previous commit.

bzr revid: vmt@openerp.com-20110826121026-da90yx3iapj6y1v1
2011-08-26 14:10:26 +02:00
Vo Minh Thu 6fdadb04f5 [IMP] tools.cache: added missing clean_caches_for_db replacement.
bzr revid: vmt@openerp.com-20110825124711-y2uckmvcoa0arz4h
2011-08-25 14:47:11 +02:00
Vo Minh Thu 9964cd1d84 [REF] osv: previous diff makes unneccessary one of makeInstance/createInstance.
bzr revid: vmt@openerp.com-20110816074431-v16wfzcy55ojkhwi
2011-08-16 09:44:31 +02:00
Vo Minh Thu 6251434cb9 [IMP] unaccent: support for the postgres unaccent contrib module.
OpenERP is now able to use the SQL unaccent() function when available,
and when the server is run with the --unaccent flag.

bzr revid: vmt@openerp.com-20110811110118-cyx2l6c3wk58083p
2011-08-11 13:01:18 +02:00
Vo Minh Thu e93d018a39 [IMP] cron: added yaml test.
The test should probably be a standalone program as the YAML
infrastructure isnt really suited for this purpose.

bzr revid: vmt@openerp.com-20110809111008-vxh0bm08n3drw1o2
2011-08-09 13:10:08 +02:00
Vo Minh Thu 266cad9a2e [IMP] unaccent: added an unaccent command-line flag, and a function to test unaccent availability.
bzr revid: vmt@openerp.com-20110722081030-ltxuqknpe1arduw5
2011-07-22 10:10:30 +02:00
Vo Minh Thu 4b8708fb10 [IMP] cron: minor cleaning.
bzr revid: vmt@openerp.com-20110714151113-v07yr2rneqafbnni
2011-07-14 17:11:13 +02:00
Vo Minh Thu 2f115c21aa [IMP] cron: moved netsvc.Agent to openerp.cron.
bzr revid: vmt@openerp.com-20110714143209-bebn6xg91fcrxro9
2011-07-14 16:32:09 +02:00
Vo Minh Thu b5daffc115 [IMP] registry: whene deleting a registry, also delete its cache and cron.
bzr revid: vmt@openerp.com-20110713153521-isn9bllnggbxwi0z
2011-07-13 17:35:21 +02:00
Vo Minh Thu abb606aa7c [MERGE] orm: _auto_init made of smaller methods, use a metaclass to discover new models.
bzr revid: vmt@openerp.com-20110615160123-7bk8u94y916mdpkj
2011-06-15 18:01:23 +02:00
Vo Minh Thu 26f22874d9 [LINT] removed unused variable, forgot to change two variables in last commit, corrected typo introduced at 3417.6.6.
bzr revid: vmt@openerp.com-20110615072231-jh977xk1jupekkpp
2011-06-15 09:22:31 +02:00
Vo Minh Thu e375049414 [REF] osv: moved osv_pool to modules/registry.
bzr revid: vmt@openerp.com-20110614142226-yd3y39a8z3ubwvxm
2011-06-14 16:22:26 +02:00
Vo Minh Thu a87ebe9600 [REF] osv:
- make it more explcicit in osv_pool that afreshly instanciated object is added to the pool
- osv_pool.init_set() is called just once with False, so
  no need to check if it is the first time it is called or
  if is called with True
- and rename it in do_parent_store as it is what it does.

bzr revid: vmt@openerp.com-20110526210532-a8i91shptz5h4k48
2011-05-26 23:05:32 +02:00
Vo Minh Thu 16ac84af68 [REF] moved openerp/registry/manager.py => openerp/modules/registry.py
- Maybe it should be called registries.py... Argh, consistency...

bzr revid: vmt@openerp.com-20110519073935-81kwuhlqcxxw1z32
2011-05-19 09:39:35 +02:00