Solution is simple, when you see the problem, if you dont use a IDE to
debug you will never see the bug because of

Try:
Finally: 

(no except, so no log)

bug come from PYTHON bug READ IT : http://bugs.python.org/issue7980

Solution is

server/openerp/addons/base/ir/ir_cron.py

in function _run_jobs_multithread, need to do a dummy to strptime

+              #http://bugs.python.org/issue7980
+              datetime.strptime('2012-01-01', '%Y-%m-%d')
                # Got the lock on the job row, now spawn a thread to execute it 
in the transaction with the lock
                task_thread = threading.Thread(target=self._run_job, 
name=job['name'], args=(task_cr, job, now))

By the way use of Try, Finally without a except is NEVER a good idea !
(see def _run_job(self, cr, job, now))

** Bug watch added: Python Roundup #7980
   http://bugs.python.org/issue7980

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/947231

Title:
  ImportError: Failed to import _strptime because the import lockis held
  by another thread.

Status in OpenERP Server:
  Confirmed

Bug description:
  2012-03-05 16:05:20,044 7205 DEBUG ? openerp.cron: Database 'tl61_test_uos' 
wake-up! Firing multi-threaded cron job processing
  2012-03-05 16:05:20,049 7205 DEBUG ? openerp.addons.base.ir.ir_cron: Cron 
execution thread for job `Run Event Reminder` spawned
  2012-03-05 16:05:20,050 7205 WARNING ? openerp.addons.base.ir.ir_cron: 
Exception in cron:
  Traceback (most recent call last):
    File 
"/srv/openerp/instances/61XA/src/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))
  ImportError: Failed to import _strptime because the import lockis held by 
another thread.
  2012-03-05 16:05:20,051 7205 DEBUG ? openerp.cron: Going to sleep for 60s

  is this a warning or a real error?

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/947231/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-india
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-india
More help   : https://help.launchpad.net/ListHelp

Reply via email to