2019-09-13 05:02:23 +00:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from etcd3_wrapper import Etcd3Wrapper
|
2019-10-13 03:38:40 +00:00
|
|
|
from decouple import config, UndefinedValueError
|
2019-09-13 05:02:23 +00:00
|
|
|
|
|
|
|
logging.basicConfig(
|
|
|
|
level=logging.DEBUG,
|
|
|
|
filename="log.txt",
|
|
|
|
filemode="a",
|
2019-09-14 16:26:08 +00:00
|
|
|
format='%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s',
|
|
|
|
datefmt='%Y-%m-%d:%H:%M:%S',
|
2019-09-13 05:02:23 +00:00
|
|
|
)
|
|
|
|
|
2019-10-13 03:38:40 +00:00
|
|
|
# load configs
|
2019-09-13 06:37:53 +00:00
|
|
|
APP_PORT = config("APP_PORT", 5000)
|
2019-10-13 03:38:40 +00:00
|
|
|
try:
|
|
|
|
etcd_client = Etcd3Wrapper(host=config("ETCD_HOST"), port=config("ETCD_PORT"))
|
|
|
|
STRIPE_API_PRIVATE_KEY = config("STRIPE_API_PRIVATE_KEY")
|
|
|
|
except UndefinedValueError as uve:
|
|
|
|
print(str(uve))
|
|
|
|
exit(1)
|