Prose\UsingSavageD::watchProcess PHP Метод

watchProcess() публичный Метод

public watchProcess ( $processName, $pid )
    public function watchProcess($processName, $pid)
    {
        // what are we doing?
        $log = usingLog()->startAction("watch the '{$processName}' process w/ ID '{$pid}' on host '{$this->args[0]}'");
        // where are we doing this?
        $safeProcessName = urlencode($this->args[0] . '.processes.' . $processName);
        $url = $this->getSavagedUrl() . "/process/{$safeProcessName}/pid";
        // make the request
        usingHttp()->post($url, [], array("pid" => $pid));
        // did it work?
        $response = fromHttp()->get($url);
        expectsHttpResponse($response)->hasStatusCode(200);
        expectsHttpResponse($response)->hasBody('{"pid":"' . $pid . '"}');
        // all done
        $log->endAction();
    }