Skip to content

Commit

Permalink
MDL-14591 - recover gracefully from portfolio cron
Browse files Browse the repository at this point in the history
  • Loading branch information
mjollnir_ committed Sep 16, 2008
1 parent 83199e4 commit 2512cb3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/portfoliolib.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,12 @@ function portfolio_cron() {

if ($expired = $DB->get_records_select('portfolio_tempdata', 'expirytime < ?', array(time()), '', 'id')) {
foreach ($expired as $d) {
$e = portfolio_exporter::rewaken_object($d);
$e->process_stage_cleanup(true);
try {
$e = portfolio_exporter::rewaken_object($d->id);
$e->process_stage_cleanup(true);
} catch (Exception $e) {
mtrade('Exception thrown in portfolio cron while cleaning up ' . $d->id . ': ' . $e->getMessage());
}
}
}
}
Expand Down

0 comments on commit 2512cb3

Please sign in to comment.