Martin Trigaux
69e91f6a7c
[FIX] base: recover thread from down postgresql
...
If postgresql database is temporarly down, the cron thread may fail.
The cursor creation fails when trying to connect to the server which leads to
the cron thread to die (uncatched exception) and will not restart when postgres
is back.
Fixes #15666
2017-02-28 18:00:00 +01:00
Christophe Simonis
e2e60bf4eb
[MERGE] forward port of branch saas-3 up to fe8106f
2014-09-26 12:53:59 +02:00
Christophe Simonis
fe8106fb85
[MERGE] forward port of branch 7.0 up to af37b30
2014-09-26 12:33:17 +02:00
Denis Ledoux
af37b3022b
[FIX] cron: doall false by default
...
As in most cases, we do not want this doall
2014-09-26 10:17:50 +02:00
Christophe Simonis
41afeec7f1
[MERGE] forward port of branch saas-5 up to 9363bc9
2014-09-04 18:03:24 +02:00
Stéphane Wirtel
1ff7ed2758
[IMP] Optimize the schedulers of the calendar, fetchmail and base_action_rules modules
...
Disable the the crons when they'd have nothing to do, re-enable them when a
task is (probably) introduced
2014-09-02 18:32:27 +02:00
Olivier Dony
e11eddf753
[MERGE] Forward-port of saas-5 up to 20cc18d
2014-08-13 20:46:47 +02:00
Olivier Dony
b9275da8a5
[MERGE] Forward-port 7.0 up to 23cffab
2014-08-13 17:30:06 +02:00
Samus CTO
1a7c8953fe
[IMP] calculating nextcall datetime of a cron SHOULD use the cron's user
2014-08-13 14:58:55 +02:00
Christophe Simonis
fda1e7d290
[FIX] ir_cron: typo introduced in commit a3d6b3a
2014-08-11 17:37:46 +02:00
Richard Mathot
a3d6b3ae4b
[FIX] ir_cron: typo introduced in fwdport
...
ae65be2b2a
2014-08-11 16:52:11 +02:00
Denis Ledoux
233670d681
[FIX] ir_cron: forgotten conflict from forward port ae65be2b2a
2014-08-11 16:03:41 +02:00
Denis Ledoux
ae65be2b2a
[MERGE] forward port of branch saas-5 up to 0739bc4
2014-08-11 15:58:02 +02:00
Denis Ledoux
2f4be42d8c
[MERGE] forward port of branch 7.0 up to 3632949
2014-08-11 15:28:54 +02:00
Samus CTO
c16884364b
[FIX] Calculate date interval using super user time zone
...
When you set the date of a cron the July 1st at midnight, if the user
time zone has a positive offset, then the converted UTC date is the
June 30th and adding 1 month will end up on July 30th translating to
July 31th instead of September 1st.
To solve this issue we use the super user time zone for the date
calculation.
2014-08-08 18:01:13 +02:00
Raphael Collet
cbe2dbb672
[MERGE] new v8 api by rco
...
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot
026e38b48f
[REM] Unnecessary `size` parameters on char fields
2014-06-25 17:13:43 +02:00
Christophe Simonis
4601d85944
[MERGE] forward port of branch 7.0 up to 6fdb783
2014-06-10 11:49:14 +02:00
Laurent Mignon
6788edcdd0
[FIX] ir_cron: use the same search criteria as when listing job to excecyte when acquiring the ock on the job before its execution to prevent running already executed job
...
Backport of fix made in trunk
2014-06-05 18:59:03 +02:00
Christophe Simonis
261dea6fec
[MERGE] forward port of server v7 up to revision 4954
...
bzr revid: qdp-launchpad@openerp.com-20130422093655-txqmbalod6qmw1s6
bzr revid: chs@openerp.com-20130423183723-9kiexdyzdew8iuzm
2013-04-23 20:37:23 +02:00
Antony Lesuisse
4f87484805
[FIX] ir.cron add a safeguard mecanism against version mistach when polling
...
bzr revid: al@openerp.com-20130418010410-0zz1zkexnjzjp3si
2013-04-18 03:04:10 +02:00
Raphael Collet
05851d21ba
[MERGE] from trunk
...
bzr revid: rco@openerp.com-20130411073017-x6e4h8xbvmy3ofdw
2013-04-11 09:30:17 +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
Raphael Collet
09be864f1d
[IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
...
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
Vo Minh Thu
1e7e2ca753
[REF] no longer use openerp.pooler.
...
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().
Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.
bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Vo Minh Thu
eafdbbd601
[FIX] cron: push the registry signaling checks in the try/except of the job itself.
...
bzr revid: vmt@openerp.com-20130219140439-f5gbkmz02mlhciow
2013-02-19 15:04:39 +01:00
Vo Minh Thu
b146cd6fec
[ADD] oe: added cron sub-command to run a single process dedicated to cron jobs.
...
bzr revid: vmt@openerp.com-20130115140110-fwu7yb2v0sj3oqqv
2013-01-15 15:01:10 +01:00
Olivier Dony
75c9cf255a
[FIX] ir.cron: avoid passing the lock-holding cursor to the job, as many batch jobs need to commit/rollback
...
Passing a dedicated cursor to the cron job is necessary to
avoid spurious commit/rollbacks releasing the cron lock on
the job row - causing duplicate executions in some cases.
lp bug: https://launchpad.net/bugs/1086396 fixed
bzr revid: odo@openerp.com-20121222011355-te4osnedofct0p1u
2012-12-22 02:13:55 +01:00
Olivier Dony
db81edc287
[FIX] *: fix/rationalize db logging to avoid incorrect values during logging
...
The setting/clearing of the tracking were not done
consistently, causing log messages that appeared
to come from one database while coming from another
one or none at all.
The tracker is now set at the earliest points
of request handling where we can:
- in web client, when creating WebRequests (dbname, uid)
- at RPC dispatching in server (uid)
- at cron job acquisition in CronWorker (dbname)
- at Registry acquisition in RegistryManager (dbname)
The tracker is cleared at the very entrance of
the request in the WSGI `application`, ensuring
that no logging is produced with an obsolete
db name. (It cannot be cleared at the end of
the request handling because the werkzeug
wrapper outputs more logging afterwards)
bzr revid: odo@openerp.com-20130301120744-jfitcmze2jldecod
2013-03-01 13:07:44 +01:00
Cecile Tonglet
ad8b76de53
[MERGE] From trunk (second time)
...
bzr revid: cto@openerp.com-20121217144753-1rboqdw01h8yrehj
2012-12-17 15:47:53 +01:00
Cecile Tonglet
5f0070dcb6
[FIX] Remove unused imports and fix some imports that doesn't use the new namespace
...
bzr revid: cto@openerp.com-20121217143029-e9ki4ftwihq7pdme
2012-12-17 15:30:29 +01:00
Cecile Tonglet
5179507e22
[MERGE] Branch updated with trunk
...
bzr revid: cto@openerp.com-20121217125902-idtlh4ztyah17bdn
2012-12-17 13:59:02 +01:00
Xavier Morel
5155f30303
[REM] unused local variables
...
bzr revid: xmo@openerp.com-20121214132533-aafgbov19ckb9ksp
2012-12-14 14:25:33 +01:00
Vo Minh Thu
509a084e79
[IMP] use the openerp namespace.
...
bzr revid: vmt@openerp.com-20121210152723-mv4dykfu6ip1991h
2012-12-10 16:27:23 +01:00
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
Xavier Morel
5bd939f0ac
[REM] useless intermediate lambdas in default values
...
bzr revid: xmo@openerp.com-20121102094705-6vcutz0bv4dc0jkl
2012-11-02 10:47:05 +01:00
Antony Lesuisse
4679680dba
manual merge of multicorn
...
bzr revid: al@openerp.com-20120922105107-q02ogtsfudphzkl6
2012-09-22 12:51:07 +02:00
Vo Minh Thu
5341b5f445
[IMP] logging: _logger.log(DEBUG) replaced by _logger.debug().
...
bzr revid: vmt@openerp.com-20120202092105-mfufuv97h8zrc2n7
2012-02-02 10:21:05 +01:00
Antony Lesuisse
91ef8c1c51
[FIX] review according to xmo :)
...
bzr revid: al@openerp.com-20120201235604-tr5iq676pzk8bi1m
2012-02-02 00:56:04 +01:00
Vo Minh Thu
48adfc8ff3
[IMP] openerp.netsvc: _logger with fully qualified module name.
...
bzr revid: vmt@openerp.com-20120124162245-sz7iujhxalwzroqt
2012-01-24 17:22:45 +01:00
Vo Minh Thu
f5db1d10ec
[IMP] openerp.addons.base: _logger with fully qualified module name.
...
bzr revid: vmt@openerp.com-20120124114730-24m0ftu1wbowg8a0
2012-01-24 12:47:30 +01:00
Antony Lesuisse
41218715bd
[FIX] cron mktime should be timegm
...
bzr revid: al@openerp.com-20111227223944-jk1humfvon1kqw59
2011-12-27 23:39:44 +01:00
Olivier Dony
5252e02cc5
[IMP] ir.cron.write/unlink: try NOWAIT lock to avoid blocking user operations during cron executions
...
bzr revid: odo@openerp.com-20110929001858-3v5ffsjela8y71qc
2011-09-29 02:18:58 +02:00
Olivier Dony
a9a50c2cc8
[FIX] ir_cron: compare timestamps always as UTC (as of v6.1)
...
bzr revid: odo@openerp.com-20110928224611-51eqnelo7mqomnwh
2011-09-29 00:46:11 +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
Vo Minh Thu
ade53b64c7
[IMP] cron: minor typo and comments.
...
bzr revid: vmt@openerp.com-20110808152908-1v12zc7elj03mtnf
2011-08-08 17:29:08 +02:00
Vo Minh Thu
a7e6a5bd48
[IMP] cron: moved testing code to some other file.
...
That code is useful for manual testing but is not called by the normal testing framework.
Its import is commented out.
bzr revid: vmt@openerp.com-20110808152024-23plfx82d35ok8ua
2011-08-08 17:20:24 +02:00
Vo Minh Thu
711554a4db
[IMP] cron: comments, docstrings, help messages.
...
bzr revid: vmt@openerp.com-20110808145931-ms0vpvg8uj72kyd0
2011-08-08 16:59:31 +02:00
Vo Minh Thu
ed1b2a92ca
[IMP] cron: comments and docstrings.
...
bzr revid: vmt@openerp.com-20110808130502-htps768jts63m9sx
2011-08-08 15:05:02 +02:00
Vo Minh Thu
faf2863a35
[IMP] cron: bracketed the jobs heap/dict with a lock.
...
bzr revid: vmt@openerp.com-20110715113845-zokj6cf6z0adj6h4
2011-07-15 13:38:45 +02:00