File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
coordinator/gscoordinator/flex/core Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1919import datetime
2020import itertools
2121import logging
22+ import time
2223
2324import graphscope
2425from dateutil import tz
Original file line number Diff line number Diff line change 2525import socket
2626import string
2727import time
28+ import traceback
2829from typing import Union
2930
3031import requests
@@ -161,8 +162,8 @@ def wrapper(*args, **kwargs):
161162 try :
162163 return fn (* args , ** kwargs )
163164 except Exception as e :
164- logger .info (str (e ))
165- return str (e ), 500
165+ logger .info ("Exception occurred: %s, %s" , str (e ), traceback . format_exc ( ))
166+ return f"Exception occurred: { str (e )} , traceback { traceback . format_exc () } " , 500
166167
167168 return wrapper
168169
@@ -245,15 +246,15 @@ def get_public_ip() -> Union[str, None]:
245246
246247
247248def data_type_to_groot (property_type ):
248- if property_type [ "primitive_type" ] is not None :
249+ if "primitive_type" in property_type :
249250 t = property_type ["primitive_type" ]
250251 if t == "DT_DOUBLE" :
251252 return "double"
252253 elif t == "DT_SIGNED_INT32" or t == "DT_SIGNED_INT64" :
253254 return "long"
254255 else :
255256 raise RuntimeError (f"Data type { t } is not supported yet." )
256- elif property_type [ "string" ] is not None :
257+ elif "string" in property_type :
257258 return "str"
258259 else :
259260 raise RuntimeError (f"Data type { str (property_type )} is not supported yet." )
You can’t perform that action at this time.
0 commit comments