Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jochem Bijlard
fractalis
Commits
49a53ef4
Commit
49a53ef4
authored
Mar 21, 2018
by
Sascha Herzinger
Browse files
Added option to skip SSL verification
parent
bc1dec44
Changes
3
Hide whitespace changes
Inline
Side-by-side
docker/config/fractalis/config.py
View file @
49a53ef4
...
...
@@ -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
fractalis/config.py
View file @
49a53ef4
...
...
@@ -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
fractalis/data/etls/picsure/shared.py
View file @
49a53ef4
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment