[AMOS commit] MDL-59594 cli: Introduce cli helpers for graceful exits Committed into Git: 2019-07-31 08:07 UTC

[AMOS commit] MDL-59594 cli: Introduce cli helpers for graceful exits Committed into Git: 2019-07-31 08:07 UTC

by AMOS bot -
Number of replies: 0
Author: Brendan Heywood
MDL-59594 cli: Introduce cli helpers for graceful exits
\core\local\cli\shutdown::script_supports_graceful_exit();

Sets up interception of exit signals and keep the script running.

\core\local\cli\shutdown::should_gracefully_exit();

Use this to check whether you should exit, often inside a long running loop.


http://git.moodle.org/gw?p=moodle.git;a=commit;h=176b5202e0f367d467c7c4f1706418407e08c50a
http://github.com/moodle/moodle/commit/176b5202e0f367d467c7c4f1706418407e08c50a

+ 3.9 en [cliexitgraceful,core_admin]
+ 3.9 en [cliexitnow,core_admin]