On the Community board, Veda posted an interesting solution for retrying to connect against OmniSci Cloud:
import time
from pymapd import connect
# Establish connection to MapD Cloud Instance
def connect_to_mapd(str_user, str_password, str_host, str_dbname):
try:
connection = connect(user=str_user, password=str_password, host=str_host, dbname=str_dbname, port=443, protocol='https')
except Exception as ex:
template = "An exception of type {0} occurred. Arguments:\n{1!r}"
message = template.format(type(ex).__name__, ex.args)
print(message)
if 'OmniSci Core not ready, try again' in message:
print("Set connection to RETRY!")
connection = "RETRY"
else:
print("Set connection to ERROR!")
connection = "ERROR"
return connection
We should incorporate this sort of functionality in pymapd.connect (after evaluating what is the correct way to do this, which may/may not be what Veda posted, as I haven't evaluated this code)
On the Community board, Veda posted an interesting solution for retrying to connect against OmniSci Cloud:
We should incorporate this sort of functionality in
pymapd.connect
(after evaluating what is the correct way to do this, which may/may not be what Veda posted, as I haven't evaluated this code)