This commit is contained in:
Huong Nguyen 2024-02-22 10:35:59 +07:00
commit 3f2b136249
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
3 changed files with 20 additions and 4 deletions

View File

@ -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();

View File

@ -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.

View File

@ -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 ===