MDL-62709 core_message: fix for silently ignored errors in task

This commit is contained in:
David M Penner 2018-06-13 14:24:28 -04:00 committed by Mark Nelson
parent 50e48a8f2d
commit 8791c50d64

View File

@ -90,10 +90,10 @@ class migrate_message_data extends \core\task\adhoc_task {
$this->migrate_data($userid, $otheruserid);
$transaction->allow_commit();
} catch (\Throwable $e) {
$updatepreference = false;
throw $e;
} finally {
$lock->release();
}
$lock->release();
} else {
// Couldn't get a lock, move on to next user but make sure we don't update user preference so
// we still try again.