Merge lp:~openerp-dev/openobject-server/6.1-opw-581239-skh into lp:openobject-server/6.1

Proposed by Somesh Khare
Status: Merged
Approved by: Naresh(OpenERP)
Approved revision: 4296
Merged at revision: 4334
Proposed branch: lp:~openerp-dev/openobject-server/6.1-opw-581239-skh
Merge into: lp:openobject-server/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
openerp/addons/base/ir/ir_cron.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.1-opw-581239-skh
Reviewer Review Type Date Requested Status
Naresh(OpenERP) Pending
Review via email: mp+131899@code.launchpad.net

Description of the change

Hello Sir,

[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

Kindly review the branch and share your views on it.

Thanks,
Somesh Khare

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

looks good check the related bug for more info and a python bug : lp:947231

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Confirmed on Trunk (means still existing and reproducible). A Merge Proposal for trunk was created to fix it. Here is the link to follow the MP on Launchpad https://code.launchpad.net/~openerp-dev/openobject-server/trunk-opw-581239-port-kbh/+merge/139448 and be informed once it's been merged in trunk: ... If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

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-04-02 12:01:58 +0000
3+++ openerp/addons/base/ir/ir_cron.py 2012-10-29 13:07:12 +0000
4@@ -240,7 +240,7 @@
5 if not acquired_lock:
6 # we're exiting due to an exception while acquiring the lot
7 task_cr.close()
8-
9+ datetime.strptime('2012-01-01', '%Y-%m-%d')
10 # Got the lock on the job row, now spawn a thread to execute it in the transaction with the lock
11 task_thread = threading.Thread(target=self._run_job, name=job['name'], args=(task_cr, job, now))
12 # force non-daemon task threads (the runner thread must be daemon, and this property is inherited by default)