Merge lp:~openerp-dev/openobject-server/trunk-opw-581239-port-kbh into lp:openobject-server

Proposed by Khushboo Bhatt(openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-server/trunk-opw-581239-port-kbh
Merge into: lp:openobject-server
Diff against target: 11 lines (+1/-0)
1 file modified
openerp/addons/base/ir/ir_cron.py (+1/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/trunk-opw-581239-port-kbh
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+139448@code.launchpad.net

Description of the change

Hello,

[FIX]ir_cron: Attribute Error _strptime occurred when more than one schedule action runs at the same time into the database.
Note: Traceback occurred rarely because strptime do not work correctly with threading.
Steps:
1. Open "Settings/Configuration/Scheduler/Scheduled Actions" menu and open "Update System Logs" and "Run Event Reminder" Action.
2. Change "Next Execution date" as eg: 10/29/2012 14:35:00 and Restart the Server.

As the Scheduled action executed system will give traceback in Server as,
Traceback (most recent call last):
  File "server/openerp/addons/base/ir/ir_cron.py", line 254, in _run_jobs_multithread
    next_call = calendar.timegm(time.strptime(next_call, DEFAULT_SERVER_DATETIME_FORMAT))
AttributeError: _strptime

Code is forward port from 6.1
Thanks,
Khushboo

To post a comment you must log in.

Unmerged revisions

4676. By <Serge sboivin >

[FIX]ir_cron: Attribute Error _strptime occurred when more than one schedule action runs at the same time into the database

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/addons/base/ir/ir_cron.py'
2--- openerp/addons/base/ir/ir_cron.py 2012-12-09 17:04:47 +0000
3+++ openerp/addons/base/ir/ir_cron.py 2012-12-12 11:45:26 +0000
4@@ -216,6 +216,7 @@
5 # we're exiting due to an exception while acquiring the lot
6 task_cr.close()
7
8+ datetime.strptime('2012-01-01', '%Y-%m-%d')
9 # Got the lock on the job row, run its code
10 _logger.debug('Starting job `%s`.', job['name'])
11 openerp.modules.registry.RegistryManager.check_registry_signaling(db_name)