diff --git a/query_itv/__main__.py b/query_itv/__main__.py index 42623cc..3a4e219 100644 --- a/query_itv/__main__.py +++ b/query_itv/__main__.py @@ -16,7 +16,6 @@ import io import zlib import os.path import requests -from .reqs_graphql import get_catalog, get_object import xml.etree.ElementTree as ET from .reqs.request_xml_service import RequestXmlService import zipfile diff --git a/query_itv/config.py b/query_itv/config.py index 2c1a479..bb9550c 100644 --- a/query_itv/config.py +++ b/query_itv/config.py @@ -1,9 +1,6 @@ class Config: - ret_path: str = 'http://10.10.8.83:32200/' self_bnd: str = 'bnd127' - enserver: str = 'http://10.10.8.83:32210/xmlrpc' - remote_bnd: str = 'bnd128' pg_host: str = '10.10.8.83' pg_port: int = 32101 @@ -27,7 +24,3 @@ class Config: s3_key_id: str = 's57' s3_access_key: str = 'd9MMinLF3U8TLSj' s3_bucket: str = 'itv' - - gql_url: str = 'https://gql.ivazh.ru/graphql' - gql_download: str = 'https://gql.ivazh.ru/item/{key}' - gql_schema: str = 'pdim' diff --git a/query_itv/reqs_graphql.py b/query_itv/reqs_graphql.py deleted file mode 100644 index 65d8ee3..0000000 --- a/query_itv/reqs_graphql.py +++ /dev/null @@ -1,46 +0,0 @@ -from gql import gql, Client -from gql.transport.aiohttp import AIOHTTPTransport -from .config import Config - -transport = AIOHTTPTransport(url=Config.gql_url) -service = Config.gql_schema - - -def get_classifier(): - client = Client(transport=transport, fetch_schema_from_transport=True, execute_timeout=None) - query = gql( - """ - query getClassifier($name: String!) { - getClassifier(name: $name) - } - """ - ) - result = client.execute(query, variable_values={"name": service}, ) - return result['getClassifier'] - - -def get_catalog(): - client = Client(transport=transport, fetch_schema_from_transport=True, execute_timeout=None) - query = gql( - """ - query getCatalog($name: String!) { - getCatalog(name: $name) - } - """ - ) - result = client.execute(query, variable_values={"name": service}) - return result['getCatalog'] - - -def get_object(oid: str): - client = Client(transport=transport, fetch_schema_from_transport=True, execute_timeout=None) - query = gql( - """ - query getObjects($oid: String!, $name: String!) { - getObject(name: $name, oid: $oid) - } - """ - ) - params = {'oid': oid, 'name': service} - result = client.execute(query, variable_values=params) - return result['getObject']