Skip to content

Commit

Permalink
Restore framerate of singular progress bars
Browse files Browse the repository at this point in the history
`rich.live.Live` assumes a more complicated display than a lone `rich.progress.Progress`. This app's progress bar use is not that complicated. Take the cooler-looking framerate.
  • Loading branch information
john-kurkowski committed Jan 5, 2024
1 parent 2e2a75a commit 4b2e60e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/music/render/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def main(
progress_group = rich.console.Group(
render_process.progress, upload_process.progress
)
with rich.live.Live(progress_group, console=console):
with rich.live.Live(progress_group, console=console, refresh_per_second=10):
async with aiohttp.ClientSession() as client, asyncio.TaskGroup() as uploads:
for project in projects:
async for _, render in render_process.process(
Expand Down
2 changes: 1 addition & 1 deletion src/music/upload/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ async def main(

console = rich.console.Console()
process = UploadProcess(console)
with rich.live.Live(process.progress, console=console):
with rich.live.Live(process.progress, console=console, refresh_per_second=10):
async with aiohttp.ClientSession() as client:
await process.process(client, oauth_token, files)

0 comments on commit 4b2e60e

Please sign in to comment.