Skip to content

Commit 0a55f98

Browse files
authored
Merge pull request #576 from sammarshallou/remove-cronlib-inclusion
Removed legacy cron function
2 parents 435d8db + dd0d2a4 commit 0a55f98

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

lib.php

-16
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,6 @@
6969
define('TOOL_OBJECTFS_DELETE_EXTERNAL_TRASH', 1);
7070
define('TOOL_OBJECTFS_DELETE_EXTERNAL_FULL', 2);
7171

72-
// Legacy cron function.
73-
function tool_objectfs_cron() {
74-
mtrace('RUNNING legacy cron objectfs');
75-
global $CFG;
76-
if ($CFG->branch <= 26) {
77-
// Unlike the task system, we do not get fine grained control over
78-
// when tasks/manipulators run. Every cron we just run all the manipulators.
79-
(new manipulator_builder())->execute_all();
80-
81-
\tool_objectfs\local\report\objectfs_report::cleanup_reports();
82-
\tool_objectfs\local\report\objectfs_report::generate_status_report();
83-
}
84-
85-
return true;
86-
}
87-
8872
/**
8973
* Sends a plugin file to the browser.
9074
* @param $course

tests/local/tasks_test.php

-7
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ protected function tearDown(): void {
3232
ob_end_clean();
3333
}
3434

35-
public function test_run_legacy_cron() {
36-
$config = manager::get_objectfs_config();
37-
$config->enabletasks = true;
38-
manager::set_objectfs_config($config);
39-
$this->assertTrue(tool_objectfs_cron());
40-
}
41-
4235
public function test_run_scheduled_tasks() {
4336
global $CFG;
4437
// If tasks not implemented.

0 commit comments

Comments
 (0)