Skip to content

Commit

Permalink
MDL-81509 tasks: Final deprecation of blocking tasks
Browse files Browse the repository at this point in the history
Final deprecation of task_base::is_blocking and task_base::set_blocking.

Signed-off-by: Daniel Ziegenberg <[email protected]>
  • Loading branch information
ziegenberg committed Nov 8, 2024
1 parent 2b337b4 commit c14810e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .upgradenotes/MDL-81509-2024092613384220.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
issueNumber: MDL-81509
notes:
core:
- message: >-
Final deprecation of methods task_base::is_blocking and
task_base::set_blocking.
type: removed
18 changes: 5 additions & 13 deletions lib/classes/task/task_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,39 +116,31 @@ public function get_cron_lock() {
}

/**
* Setter for $blocking.
*
* Please note that task blocking is no longer supported.
* If you are using it in older versions of Moodle you are strongly advised to rewrite your code
* as has a detrimental impact upon performance.
*
* @deprecated since Moodle 4.4 See MDL-67667
* @todo Remove in MDL-81509
*/
#[\core\attribute\deprecated(
replacement: null,
since: '4.4',
mdl: 'MDL-67667',
reason: 'Blocking tasks are no longer supported',
final: true,
)]
public function set_blocking($blocking) {
public function set_blocking() {
\core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]);
}

/**
* Getter for $blocking.
*
* @return bool
* @deprecated since Moodle 4.4 See MDL-67667
* @todo Remove in MDL-81509
*/
#[\core\attribute\deprecated(
replacement: null,
since: '4.4',
mdl: 'MDL-67667',
reason: 'Blocking tasks are no longer supported',
final: true,
)]
public function is_blocking() {
\core\deprecation::emit_deprecation_if_present([$this, __FUNCTION__]);
return false;
}

/**
Expand Down

0 comments on commit c14810e

Please sign in to comment.