Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractalis
Commits
ea117547
Commit
ea117547
authored
Jun 21, 2018
by
Sascha Herzinger
Browse files
logging and picsure etl production fixes
parent
79b379b8
Pipeline
#5468
passed with stages
in 10 minutes and 4 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docker/config/fractalis/config.py
View file @
ea117547
...
...
@@ -3,3 +3,4 @@ REDIS_HOST = 'redis'
BROKER_URL
=
'amqp://guest:guest@rabbitmq:5672//'
CELERY_RESULT_BACKEND
=
'redis://redis:6379'
ETL_VERIFY_SSL_CERT
=
False
FRACTALIS_LOG_CONFIG
=
'/logging.yaml'
docker/config/fractalis/logging.yaml
0 → 100644
View file @
ea117547
version
:
1
disable_existing_loggers
:
False
formatters
:
default
:
format
:
"
%(asctime)s
-
%(name)s
-
%(levelname)s
-
%(message)s"
handlers
:
default
:
class
:
logging.handlers.TimedRotatingFileHandler
level
:
WARNING
formatter
:
default
filename
:
fractalis.log
when
:
midnight
backupCount
:
14
encoding
:
utf8
console
:
class
:
logging.StreamHandler
level
:
WARNING
formatter
:
default
root
:
level
:
INFO
handlers
:
[
default
,
console
]
fractalis
:
Flask
:
level
:
INFO
handlers
:
[
default
,
console
]
\ No newline at end of file
docker/docker-compose.yml
View file @
ea117547
version
:
'
3.3'
services
:
redis
:
image
:
'
redis:alpine
'
image
:
redis:alpine
command
:
>
sh -c "redis-server
&& redis-cli CONFIG SET maxmemory 4gb
&& redis-cli CONFIG SET maxmemory-policy allkeys-lru"
rabbitmq
:
image
:
'
rabbitmq:alpine
'
image
:
rabbitmq:alpine
app
:
image
:
'
sherzinger/fractalis:0.6.0
'
image
:
sherzinger/fractalis:0.6.0
volumes
:
-
./config/fractalis/config.py:/config.py
-
./config/fractalis/logging.yaml:/logging.yaml
environment
:
-
FRACTALIS_CONFIG=/config.py
command
:
gunicorn -w 3 -b :5000 --log-file
gunicorn.log
fractalis:app
command
:
gunicorn -w 3 -b :5000 --log-file
- --access-logfile -
fractalis:app
expose
:
-
'
5000
'
-
5000
depends_on
:
-
redis
-
rabbitmq
worker
:
image
:
'
sherzinger/fractalis:0.6.0
'
image
:
sherzinger/fractalis:0.6.0
volumes
:
-
./config/fractalis/config.py:/config.py
-
./config/fractalis/logging.yaml:/logging.yaml
environment
:
-
FRACTALIS_CONFIG=/config.py
command
:
celery worker -A fractalis:celery -l
info
--autoscale 16,4
command
:
celery worker -A fractalis:celery -l
warning
--autoscale 16,4
depends_on
:
-
redis
-
rabbitmq
nginx
:
image
:
'
nginx:alpine
'
image
:
nginx:alpine
volumes
:
-
./config/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
-
./config/nginx/html:/usr/share/nginx/html
...
...
fractalis/data/etls/picsure/shared.py
View file @
ea117547
...
...
@@ -7,7 +7,7 @@ from fractalis import app
def
submit_query
(
query
:
str
,
server
:
str
,
token
:
str
)
->
int
:
r
=
requests
.
post
(
url
=
'{}/
rest/v1/
queryService/runQuery'
.
format
(
server
),
url
=
'{}/queryService/runQuery'
.
format
(
server
),
data
=
query
,
headers
=
{
'Content-Type'
:
'application/json'
,
...
...
@@ -23,7 +23,7 @@ def submit_query(query: str, server: str, token: str) -> int:
def
wait_for_completion
(
result_id
:
int
,
server
,
token
):
def
_check_status
():
return
requests
.
get
(
url
=
'{}/
rest/v1/
resultService/resultStatus/{}'
.
format
(
url
=
'{}/resultService/resultStatus/{}'
.
format
(
server
,
result_id
),
headers
=
{
'Content-Type'
:
'application/json'
,
...
...
@@ -37,7 +37,7 @@ def wait_for_completion(result_id: int, server, token):
def
get_data
(
result_id
,
server
,
token
):
r
=
requests
.
get
(
url
=
'{}/
rest/v1/
resultService/result/{}/CSV'
.
format
(
url
=
'{}/resultService/result/{}/CSV'
.
format
(
server
,
result_id
),
headers
=
{
'Content-Type'
:
'application/json'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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