Commit 49a53ef4 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

Added option to skip SSL verification

parent bc1dec44
......@@ -2,3 +2,4 @@ SECRET_KEY = 'OVERWRITE ME IN PRODUCTION!!!'
REDIS_HOST = 'redis'
BROKER_URL = 'amqp://guest:guest@rabbitmq:5672//'
CELERY_RESULT_BACKEND = 'redis://redis:6379'
ETL_VERIFY_SSL_CERT = False
......@@ -32,6 +32,7 @@ FRACTALIS_CACHE_EXP = timedelta(days=10)
FRACTALIS_ENCRYPT_CACHE = False
# Location of your the log configuration file.
FRACTALIS_LOG_CONFIG = os.path.join(os.path.dirname(__file__), 'logging.yaml')
# Whether to verify the certs of https data sources
ETL_VERIFY_SSL_CERT = False
# DO NOT MODIFY THIS FILE DIRECTLY
......@@ -2,6 +2,8 @@ from time import sleep
import requests
from fractalis import app
def submit_query(query: str, server: str, token: str) -> int:
r = requests.post(
......@@ -10,7 +12,8 @@ def submit_query(query: str, server: str, token: str) -> int:
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer {}'.format(token)
}
},
verify=app.config['ETL_VERIFY_SSL_CERT']
)
r.raise_for_status()
result_id = r.json()['resultId']
......@@ -25,7 +28,8 @@ def wait_for_completion(result_id: int, server, token):
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer {}'.format(token)
}
},
verify=app.config['ETL_VERIFY_SSL_CERT']
).json()
while _check_status()['status'] == 'RUNNING':
sleep(1)
......@@ -38,7 +42,8 @@ def get_data(result_id, server, token):
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer {}'.format(token)
}
},
verify=app.config['ETL_VERIFY_SSL_CERT']
)
r.raise_for_status()
return r.text
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment