mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-80862-main' of https://github.com/andrewnicols/moodle
This commit is contained in:
commit
3f2b136249
@ -435,6 +435,9 @@ class behat_util extends testing_util {
|
||||
// Inform data generator.
|
||||
self::get_data_generator()->reset();
|
||||
|
||||
// Reset the task manager.
|
||||
\core\task\manager::reset_state();
|
||||
|
||||
// Initialise $CFG with default values. This is needed for behat cli process, so we don't have modified
|
||||
// $CFG values from the old run. @see set_config.
|
||||
self::remove_added_config();
|
||||
|
@ -63,17 +63,26 @@ class manager {
|
||||
/**
|
||||
* @var array A cached queue of adhoc tasks
|
||||
*/
|
||||
public static $miniqueue;
|
||||
protected static array $miniqueue = [];
|
||||
|
||||
/**
|
||||
* @var int The last recorded number of unique adhoc tasks.
|
||||
*/
|
||||
public static $numtasks;
|
||||
protected static int $numtasks = 0;
|
||||
|
||||
/**
|
||||
* @var string Used to determine if the adhoc task queue is distributing or filling capacity.
|
||||
* @var null|int Used to determine if the adhoc task queue is distributing or filling capacity.
|
||||
*/
|
||||
public static $mode;
|
||||
protected static ?int $mode = null;
|
||||
|
||||
/**
|
||||
* Reset the state of the task manager.
|
||||
*/
|
||||
public static function reset_state(): void {
|
||||
self::$miniqueue = [];
|
||||
self::$numtasks = 0;
|
||||
self::$mode = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a component name, will load the list of tasks in the db/tasks.php file for that component.
|
||||
|
@ -57,6 +57,10 @@ information provided here is intended especially for developers.
|
||||
is applied.
|
||||
* The Horde library has been removed from core. It was only used by the tool_messageinbound. Now tool_messageinbound
|
||||
uses the new RoundCube library.
|
||||
* Visibility of internal properties of the \core\task\manager have been changed from public to protected. These should not have been accessible.
|
||||
- $miniqueue
|
||||
- $numtasks
|
||||
- $mode
|
||||
|
||||
=== 4.3 ===
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user