Skip to content

Commit

Permalink
[FIX] ir_cron: typo introduced in fwdport
Browse files Browse the repository at this point in the history
  • Loading branch information
rim-odoo committed Aug 11, 2014
1 parent 34cc064 commit a3d6b3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions openerp/addons/base/ir/ir_cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ def _callback(self, cr, uid, model_name, method_name, args, job_id):
except Exception, e:
self._handle_callback_exception(cr, uid, model_name, method_name, args, job_id, e)

def _process_job(self, cr, job, cron_cr):
def _process_job(self, job_cr, job, cron_cr):
""" Run a given job taking care of the repetition.
:param cr: cursor to use to execute the job, safe to commit/rollback
:param job_cr: cursor to use to execute the job, safe to commit/rollback
:param job: job to be run (as a dictionary).
:param cron_cr: cursor holding lock on the cron job row, to use to update the next exec date,
must not be committed/rolled back!
Expand All @@ -169,7 +169,7 @@ def _process_job(self, cr, job, cron_cr):
if numbercall > 0:
numbercall -= 1
if not ok or job['doall']:
self._callback(cr, job['user_id'], job['model'], job['function'], job['args'], job['id'])
self._callback(job_cr, job['user_id'], job['model'], job['function'], job['args'], job['id'])
if numbercall:
nextcall += _intervalTypes[job['interval_type']](job['interval_number'])
ok = True
Expand All @@ -181,7 +181,7 @@ def _process_job(self, cr, job, cron_cr):
self.invalidate_cache(cr, SUPERUSER_ID)

finally:
cr.commit()
job_cr.commit()
cron_cr.commit()

@classmethod
Expand Down

0 comments on commit a3d6b3a

Please sign in to comment.