public static function disable($params) { $name = $params->get('name'); try { $result = Jobs::disable($name); } catch (Exception $e) { throw new RpcException($e->getMessage(), -31001); } return $result; }
private function disable($job) { $result = SourceJobs::disable($job); if ($result == false) { return $this->color->convert("\n%yJob not found%n"); } return $this->color->convert("\n%gJob deactivated%n"); }