mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-07-31 12:56:19 +00:00
Merge branch '0.6_dev_jc' of github.com:OpenSPG/openspg into 0.6_dev_jc
This commit is contained in:
commit
3da7b17124
@ -41,11 +41,7 @@ class Client(ABC):
|
|||||||
project_id (int): The ID of the user's project. If not provided, the value from the environment variable `KAG_PROJECT_ID` is used.
|
project_id (int): The ID of the user's project. If not provided, the value from the environment variable `KAG_PROJECT_ID` is used.
|
||||||
"""
|
"""
|
||||||
self._host_addr = host_addr or env.host_addr
|
self._host_addr = host_addr or env.host_addr
|
||||||
# self._project_id = project_id or env.id
|
self._project_id = project_id or env.id
|
||||||
|
|
||||||
@property
|
|
||||||
def _project_id(self):
|
|
||||||
return env.id
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def serialize(obj):
|
def serialize(obj):
|
||||||
|
@ -29,7 +29,7 @@ class ReasonerClient(Client):
|
|||||||
"""SPG Reasoner Client."""
|
"""SPG Reasoner Client."""
|
||||||
|
|
||||||
def __init__(self, host_addr: str = None, project_id: int = None, namespace=None):
|
def __init__(self, host_addr: str = None, project_id: int = None, namespace=None):
|
||||||
super().__init__(host_addr, project_id)
|
super().__init__(host_addr, str(project_id))
|
||||||
self._rest_client: rest.ReasonerApi = rest.ReasonerApi(
|
self._rest_client: rest.ReasonerApi = rest.ReasonerApi(
|
||||||
api_client=ApiClient(configuration=Configuration(host=host_addr))
|
api_client=ApiClient(configuration=Configuration(host=host_addr))
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user