← Back to team overview

mahara-contributors team mailing list archive

[Bug 891170] Re: race conditions in cron

 

Andrew, can you have a look at https://reviews.mahara.org/#change,881 -
I think it's enough to just remove the stale lock and exit there instead
of trying to restart the function.

** Changed in: mahara
       Status: Triaged => In Progress

** Changed in: mahara
     Assignee: (unassigned) => Richard Mansfield (richard-mansfield)

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/891170

Title:
  race conditions in cron

Status in Mahara ePortfolio:
  In Progress

Bug description:
  Thanks to tim hunt at the OU for pointing the first issue out:

  It's possible for cron_lock to fail to get the $started value if the row has been deleted between attempting to insert the record, and attempting to retrieve the start date
  http://gitorious.org/mahara/mahara/blobs/master/htdocs/lib/cron.php#line488

  Additionally, when we try to restart a job which has been running for > 24 hours, we should probably call cron_lock() rather than insert_record()
  http://gitorious.org/mahara/mahara/blobs/master/htdocs/lib/cron.php#line498

  That said, we're very unlikely to ever hit this given the use of cron.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/891170/+subscriptions


References