MDL-38734: Automated backup failure causing all course to fail

This commit is contained in:
Tony Levi
2013-10-18 15:04:22 +08:00
committed by Dan Poltawski
parent 5c740905f5
commit cd9c46207d
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -37,6 +37,7 @@ class create_and_clean_temp_stuff extends backup_execution_step {
backup_helper::check_and_create_backup_dir($this->get_backupid());// Create backup temp dir
backup_helper::clear_backup_dir($this->get_backupid()); // Empty temp dir, just in case
backup_helper::delete_old_backup_dirs(time() - (4 * 60 * 60)); // Delete > 4 hours temp dirs
backup_controller_dbops::drop_backup_ids_temp_table($this->get_backupid()); // Drop ids temp table
backup_controller_dbops::create_backup_ids_temp_table($this->get_backupid()); // Create ids temp table
}
}
@@ -164,8 +164,10 @@ abstract class backup_controller_dbops extends backup_dbops {
$dbman = $DB->get_manager(); // We are going to use database_manager services
$targettablename = 'backup_ids_temp';
$table = new xmldb_table($targettablename);
$dbman->drop_table($table); // And drop it
if ($dbman->table_exists($targettablename)) {
$table = new xmldb_table($targettablename);
$dbman->drop_table($table); // And drop it
}
}
/**