MDL-65729 Backup: Split individual backups into ad-hoc tasks

* refactor run automated backup
* new backup status of Queued
* adhoc task for backing up a course
* course locking for course backup adhoc task
* use Moodle locking instead of custom locking for run automated backup task
* add unit tests to extracted methods
This commit is contained in:
John Yao
2019-12-04 15:10:23 +11:00
parent 800563e415
commit d0734df404
9 changed files with 675 additions and 251 deletions
@@ -43,7 +43,6 @@ class automated_backup_task extends scheduled_task {
*/
public function execute() {
global $CFG;
// Run automated backups if required - these may take a long time to execute.
require_once($CFG->dirroot.'/backup/util/includes/backup_includes.php');
require_once($CFG->dirroot.'/backup/util/helper/backup_cron_helper.class.php');