[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package Joomla.Administrator 5 * @subpackage com_scheduler 6 * 7 * @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org> 8 * @license GNU General Public License version 2 or later; see LICENSE.txt 9 */ 10 11 namespace Joomla\Component\Scheduler\Administrator\Task; 12 13 // phpcs:disable PSR1.Files.SideEffects 14 \defined('_JEXEC') or die; 15 // phpcs:enable PSR1.Files.SideEffects 16 17 /** 18 * A namespace mapping Task statuses to integer values. 19 * 20 * @since 4.1.0 21 */ 22 abstract class Status 23 { 24 /** 25 * Replacement exit code used when a routine returns an invalid (non-integer) exit code. 26 * 27 * @since 4.1.0 28 */ 29 public const INVALID_EXIT = -2; 30 31 /** 32 * Replacement exit code used when a routine does not return an exit code. 33 * 34 * @since 4.1.0 35 */ 36 public const NO_EXIT = -1; 37 38 /** 39 * Status code used when the routine just starts. This is not meant to be an exit code. 40 * 41 * @since 4.1.0 42 */ 43 public const RUNNING = 1; 44 45 /** 46 * Exit code used on failure to acquire a pseudo-lock. 47 * 48 * @since 4.1.0 49 */ 50 public const NO_LOCK = 2; 51 52 /** 53 * Exit code used on failure to run the task. 54 * 55 * @since 4.1.0 56 */ 57 public const NO_RUN = 3; 58 59 /** 60 * Exit code used on failure to release lock/update the record. 61 * 62 * @since 4.1.0 63 */ 64 public const NO_RELEASE = 4; 65 66 /** 67 * Exit code used when a routine is either "knocked out" by an exception or encounters an exception it cannot handle 68 * gracefully. 69 * ? Should this be retained ? 70 * 71 * @since 4.1.0 72 */ 73 public const KNOCKOUT = 5; 74 75 /** 76 * Exit code used when a task needs to resume (reschedule it to run a.s.a.p.). 77 * 78 * Use this for long running tasks, e.g. batch processing of hundreds or thousands of files, 79 * sending newsletters with thousands of subscribers etc. These are tasks which might run out of 80 * memory and/or hit a time limit when lazy scheduling or web triggering of tasks is being used. 81 * Split them into smaller batches which return Status::WILL_RESUME. When the last batch is 82 * executed return Status::OK. 83 * 84 * @since 4.1.0 85 */ 86 public const WILL_RESUME = 123; 87 88 /** 89 * Exit code used when a task times out. 90 * 91 * @since 4.1.0 92 */ 93 public const TIMEOUT = 124; 94 95 /** 96 * Exit code when a *task* does not exist. 97 * 98 * @since 4.1.0 99 */ 100 public const NO_TASK = 125; 101 102 /** 103 * Exit code used when a *routine* is missing. 104 * 105 * @since 4.1.0 106 */ 107 public const NO_ROUTINE = 127; 108 109 /** 110 * Exit code on success. 111 * 112 * @since 4.1.0 113 */ 114 public const OK = 0; 115 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |