Module emse-mms.utils.db
Expand source code
from requests import post
def testConnection():
print('Testing connection...')
# test connection to API
response = post('http://client:4000/graphql', {}, {
'query': """query{
module(input:{
}){
id
}
}"""
})
if response.status_code == 200:
print('API is running')
else:
print('API is not running')
exit(1)
Functions
def testConnection()
-
Expand source code
def testConnection(): print('Testing connection...') # test connection to API response = post('http://client:4000/graphql', {}, { 'query': """query{ module(input:{ }){ id } }""" }) if response.status_code == 200: print('API is running') else: print('API is not running') exit(1)