Merge branch 'master' of github.com:yumoqing/apppublic

This commit is contained in:
yumoqing 2023-05-27 13:47:56 +08:00
commit 570d1444a9

15
appPublic/asynciorun.py Executable file
View File

@ -0,0 +1,15 @@
import asyncio
import ays
from sqlor import DBPools
from appPublic.jsonConfig import getConfig
def run(coro):
p = '.'
if len(sys.argv) > 1:
p = sys.argv[1]
config = getConfig(p, {'woridir':p})
DBPools(config.databases)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(coro())