OHLC's and datamain.py; update DB and package requirements.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from logging.config import fileConfig
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
@@ -11,7 +12,7 @@ config = context.config
|
||||
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
if config.config_file_name is not None:
|
||||
if config.config_file_name is not None and sys.argv[0].endswith('alembic'): # only configure logs if we are the alembic process not dexorder
|
||||
fileConfig(config.config_file_name)
|
||||
|
||||
# DEXORDER SETUP
|
||||
@@ -19,7 +20,8 @@ from sys import path
|
||||
path.append('src')
|
||||
import dexorder.database.model
|
||||
target_metadata = dexorder.database.model.Base.metadata
|
||||
config.set_main_option('sqlalchemy.url', dexorder.config.db_url)
|
||||
if not config.get_main_option('sqlalchemy.url'):
|
||||
config.set_main_option('sqlalchemy.url', dexorder.config.db_url)
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
# can be acquired:
|
||||
|
||||
Reference in New Issue
Block a user