Commit ea117547 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

logging and picsure etl production fixes

parent 79b379b8
Pipeline #5468 passed with stages
in 10 minutes and 4 seconds
......@@ -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'
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
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
......
......@@ -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',
......
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