mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[enh] ensure_futur does what I want
This commit is contained in:
parent
eb6d7ac19e
commit
ea2b99b23a
1 changed files with 2 additions and 1 deletions
3
run.py
3
run.py
|
@ -61,6 +61,8 @@ async def initialize_app_list():
|
|||
state="scheduled",
|
||||
)
|
||||
|
||||
asyncio.ensure_future(run_jobs())
|
||||
|
||||
|
||||
async def run_jobs():
|
||||
print("Run jobs...")
|
||||
|
@ -133,5 +135,4 @@ async def index(request):
|
|||
if __name__ == "__main__":
|
||||
all_index_ws = []
|
||||
app.add_task(initialize_app_list())
|
||||
app.add_task(run_jobs())
|
||||
app.run('localhost', port=5000, debug=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue