-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asyncio for make-stats #97
Conversation
@@ -167,7 +168,9 @@ def make_stats( | |||
typer.echo("Missing source database connection details.", err=True) | |||
sys.exit(1) | |||
|
|||
src_stats = make_src_stats(src_dsn, config) | |||
src_stats = asyncio.get_event_loop().run_until_complete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this change was purely for SSG then it sounds like .run()
would be simplest but I guess we're calling make_stats
from TAPAS so there might already be a loop running?
src_stats = asyncio.get_event_loop().run_until_complete( | |
src_stats = asyncio.get_event_loop().run_until_complete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeaaah, I think that was my logic here. I'm not super sure of my understanding of how things like multiple event loops work though.
Async make stats iain
Co-authored-by: Iain <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Runs the make-stats queries in parallel.