Przeglądaj źródła

Expose isCLI to DI

This allows apps/backgroundjobs to find out if they are run from the CLI
or not. Some apps/backgroundjobs might do more if they are not at risk
of timing out.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v14.0.0beta1
Roeland Jago Douma 6 lat temu
rodzic
commit
c37bc4fdf9
No account linked to committer's email address
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3
    0
      lib/private/Server.php

+ 3
- 0
lib/private/Server.php Wyświetl plik

@@ -164,6 +164,9 @@ class Server extends ServerContainer implements IServerContainer {
parent::__construct();
$this->webRoot = $webRoot;

// To find out if we are running from CLI or not
$this->registerParameter('isCLI', \OC::$CLI);

$this->registerService(\OCP\IServerContainer::class, function (IServerContainer $c) {
return $c;
});

Ładowanie…
Anuluj
Zapisz