-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
executable file
·41 lines (30 loc) · 1.38 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# !/usr/bin/env python
# coding=utf-8
import os
import logging
DEBUG = False
log_format="%(asctime)s %(filename)s [funcname:%(funcName)s] [line:%(lineno)d] %(levelname)s %(message)s"
logging.basicConfig(level=logging.INFO if not DEBUG else logging.DEBUG, format=log_format)
BASE_PATH = os.path.dirname(os.path.abspath(__file__))
MESOS_URI=os.getenv("MESOS_URI", "http://127.0.0.1:5050")
MARATHON_URI=os.getenv("MARATHON_URI", "http://127.0.0.1:8080")
MARATHON_USER=os.getenv("MARATHON_USER", "root")
MARATHON_PASSWD = os.getenv("MARATHON_PASSWD", "root")
DOCKER_URL=os.getenv("DOCKER_URL", "unix:///var/run/docker.sock")
DOCKER_TIMEOUT = int(os.getenv("DOCKER_TIMEOUT", 30))
MODE=os.getenv("MODE", "cluster")
MAX_FILE_TIMEOUT = 3600 * 60
# kafka configs
BURROW_URI = os.getenv("BURROW_URI", "http://127.0.0.1:9000")
KAFKA_CLUSTER = os.getenv("KAFKA_CLUSTER", "yg_kafka")
KAFKA_CONFIG_FILE = os.getenv("KAFKA_CONFIG_FILE", "kafka_lag.yml")
KAFKA_ZK = os.getenv("KAFKA_ZK", "127.0.0.1:2181")
KAFKA_SERVERS = os.getenv("KAFKA_SERVERS", "127.0.0.1:9092")
DEFAULT_KAFKA_TIMEOUT = int(os.getenv("KAFKA_TIMEOUT", 10))
DEFAULT_ZK_TIMEOUT = int(os.getenv("ZK_TIMEOUT", 5))
INFLUXDB_DSN = os.getenv("INFLUXDB_DSN", "influxdb://localhost:8086/")
MONITOR_INTERVAL = int(os.getenv("MONITOR_INTERVAL", 60))
try:
from local_settings import *
except Exception, e:
pass