get some tests working
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
import logging
|
||||
|
||||
import cic_eth.cli
|
||||
from cic_eth.server.app import create_app
|
||||
from cic_eth.server.config import get_config
|
||||
from cic_eth.server.celery import create_celery_wrapper
|
||||
|
||||
|
||||
config = get_config()
|
||||
arg_flags = cic_eth.cli.argflag_std_base
|
||||
local_arg_flags = cic_eth.cli.argflag_local_taskcallback
|
||||
argparser = cic_eth.cli.ArgumentParser(arg_flags)
|
||||
argparser.process_local_flags(local_arg_flags)
|
||||
args = argparser.parse_args()
|
||||
config = cic_eth.cli.Config.from_args(args, arg_flags, local_arg_flags)
|
||||
# Define log levels
|
||||
if args.vv:
|
||||
logging.getLogger().setLevel(logging.DEBUG)
|
||||
elif args.v:
|
||||
logging.getLogger().setLevel(logging.INFO)
|
||||
|
||||
|
||||
# Setup Celery App
|
||||
@@ -18,13 +29,9 @@ redis_port = config.get('REDIS_PORT')
|
||||
redis_db = config.get('REDIS_DB')
|
||||
redis_timeout = config.get('REDIS_TIMEOUT')
|
||||
|
||||
|
||||
app = create_app(chain_spec,
|
||||
celery_queue,
|
||||
redis_host,
|
||||
redis_port,
|
||||
redis_db,
|
||||
redis_timeout)
|
||||
celery_wrapper = create_celery_wrapper(celery_queue=celery_queue, chain_spec=chain_spec,
|
||||
redis_db=redis_db, redis_host=redis_host, redis_port=redis_port, redis_timeout=redis_timeout)
|
||||
app = create_app(celery_wrapper)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
|
||||
Reference in New Issue
Block a user