ActivateTask
MMO\admin\tasks · 1 symbol · generated 5 Oct 2026
ActivateTask
ActivateTask.php:20The deploy itself: point current at the new release.
- Namespace
MMO\admin\tasks- Extends
- aDeployTask
Index
| healthIsFatal | ||
| healthTimeout | ||
| apply($context) | ||
| checkHealth($context, $url) | Ask the target, repeatedly, whether it is serving the release that was just activated. | |
| describe($answer, $expect) | ||
| expected($context) | ||
| getDescription() | ||
| getTimeout($context) | ||
| isChecked($context) | ||
| isHealthy($answer, $expect) | ||
| isNeeded($context) | ||
| isRollbackCritical() | A failed swap that cannot be undone is the one thing worth stopping the whole rollback for. | |
| onOrigin($url, $origin) | ||
| plan($context) | ||
| probe($runner, $url, $loopback, $body) | ||
| request($runner, $command) | ||
| rollback($context) | ||
| verify($context) | ||
| __construct($healthTimeout, $healthIsFatal) |
Properties2
healthIsFatal
- Type
- bool
healthTimeout
- Type
- int
Methods17
apply($context)
ActivateTask.php:79checkHealth($context, $url)
ActivateTask.php:177Ask the target, repeatedly, whether it is serving the release that was just activated.
describe($answer, $expect)
ActivateTask.php:298expected($context)
ActivateTask.php:237| $context | Context | |
| returns | null | string | the target's healthExpect with this release's placeholders resolved: {release}, and {checksum} read from the activated release's own .release -- what is on the target, not what this run believes it shipped, so an activate or a rerun that shipped nothing checks the right thing too. |
getDescription()
ActivateTask.php:28| returns | string |
getTimeout($context)
ActivateTask.php:37| $context | Context | |
| returns | int | how long THIS target's health check may take: its own healthTimeout wins, because the right answer is a property of the machine. A host we control restarts its interpreter in reload and answers at once; a shared webspace has nothing to restart and picks the swap up as each worker's realpath cache expires, so the same 20 seconds would roll back a release that was about to be fine. |
isChecked($context)
ActivateTask.php:42isHealthy($answer, $expect)
ActivateTask.php:292isNeeded($context)
ActivateTask.php:48isRollbackCritical()
ActivateTask.php:146A failed swap that cannot be undone is the one thing worth stopping the whole rollback for.
| returns | bool |
onOrigin($url, $origin)
ActivateTask.php:249plan($context)
ActivateTask.php:53probe($runner, $url, $loopback, $body)
ActivateTask.php:261| $runner | ShellRunner | the shell that will run it. |
| $url | string | |
| $loopback = null | null | string | a host name to pin to 127.0.0.1 -- on 80 and 443, so the vhost's http->https redirect stays on this machine, and on the url's own port. |
| $body = false | bool | whether the answer's body is needed (to look for healthExpect in it). |
| returns | string | the curl command: it prints the body (when wanted), a newline, then the FINAL http status. |
request($runner, $command)
ActivateTask.php:275| $runner | ShellRunner | |
| $command | string | |
| returns | array | string, body: string} the final http status ('' when the request did not complete) and the body. |
rollback($context)
ActivateTask.php:123verify($context)
ActivateTask.php:99__construct($healthTimeout, $healthIsFatal)
ActivateTask.php:21Inherited members (36)
| Constants | Declared by | Description | |
|---|---|---|---|
ALERT | iLogLevel | Alert: Action must be taken immediately. | |
ALL | iLogLevel | Mask for all | |
ALL_PLUS | iLogLevel | debug everything | |
BACKTRACE | iLogLevel | ||
CRITICAL | iLogLevel | Critical: Critical conditions. | |
DEBUG | iLogLevel | Debug: Detailed debug information. | |
DEEP | iLogLevel | debug everything with arguments | |
EMERGENCY | iLogLevel | Emergency: System is unusable. | |
ERROR | iLogLevel | Error: Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ERROR_PLUS | iLogLevel | Mask for all error | |
FATAL | iLogLevel | Mask for all fatal error | |
INFO | iLogLevel | Info: Interesting events. | |
INFO_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
MEMORY | iLogLevel | include backtrace object | |
NOTICE | iLogLevel | Notice: Normal but significant events. | |
NOTICE_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
TRACE | iLogLevel | include backtrace as origins | |
WARNING | iLogLevel | Warning: Exceptional occurrences that are not errors. | |
WARNING_PLUS | iLogLevel | Mask for all errors and warnings |
| Properties | Declared by | Description | |
|---|---|---|---|
verbosity | aDeployTask |
| Methods | Declared by | Description | |
|---|---|---|---|
alert($message, $context) | aDeployTask | Action must be taken immediately. | |
backtraces($message, $context) | aDeployTask | Force-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it). | |
critical($message, $context) | aDeployTask | Critical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask. | |
debug($message, $context) | aDeployTask | Detailed debug information. | |
debugName() | aDeployTask | ||
emergency($message, $context) | aDeployTask | System is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask. | |
error($message, $context) | aDeployTask | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
getName() | aDeployTask | ||
getVerbosity() | aDeployTask | ||
info($message, $context) | aDeployTask | Interesting events. No-op if INFO is currently filtered out by the verbosity mask. | |
isChange() | aDeployTask | Whether running this task CHANGES anything. | |
log($level, $message, $context) | aDeployTask | Logs with an arbitrary level. | |
notice($message, $context) | aDeployTask | Normal but significant events. | |
setVerbosity($verb) | aDeployTask | Set the current verbosity mask, replacing whatever it was before. | |
testVerbosity($level) | aDeployTask | Test whether a given level (or set of levels) is currently enabled by this instance's verbosity mask. | |
warning($message, $context) | aDeployTask | Exceptional occurrences that are not errors. |