fixes import statements
This commit is contained in:
parent
2c1969c3f0
commit
6230a8ae49
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@ import aiojobs.aiohttp
|
||||||
import asyncio
|
import asyncio
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
|
|
||||||
import schema.db_helpers as helpers
|
from schema.db_helpers import backup_database, setup_database
|
||||||
from lbry_comment_server.database import obtain_connection
|
from lbry_comment_server.database import obtain_connection
|
||||||
from lbry_comment_server.handles import api_endpoint
|
from lbry_comment_server.handles import api_endpoint
|
||||||
from lbry_comment_server.settings import config
|
from lbry_comment_server.settings import config
|
||||||
|
@ -33,7 +33,7 @@ logger.addHandler(stdout_handler)
|
||||||
|
|
||||||
async def setup_db_schema(app):
|
async def setup_db_schema(app):
|
||||||
logger.info('Setting up schema in %s', app['db_path'])
|
logger.info('Setting up schema in %s', app['db_path'])
|
||||||
helpers.setup_database(app['db_path'])
|
setup_database(app['db_path'])
|
||||||
|
|
||||||
|
|
||||||
async def close_comment_scheduler(app):
|
async def close_comment_scheduler(app):
|
||||||
|
@ -47,7 +47,7 @@ async def create_database_backup(app):
|
||||||
await asyncio.sleep(app['config']['BACKUP_INT'])
|
await asyncio.sleep(app['config']['BACKUP_INT'])
|
||||||
with obtain_connection(app['db_path']) as conn:
|
with obtain_connection(app['db_path']) as conn:
|
||||||
logger.debug('%s backing up database')
|
logger.debug('%s backing up database')
|
||||||
helpers.backup_database(conn, app['backup'])
|
backup_database(conn, app['backup'])
|
||||||
|
|
||||||
except asyncio.CancelledError as e:
|
except asyncio.CancelledError as e:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Reference in a new issue