Skip to content

Commit 843a013

Browse files
committed
fix: add progress bar format
1 parent 0b028b5 commit 843a013

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

videodb/_utils/_http_client.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ def _get_output(self, url: str):
142142
raise Exception("Stuck on processing status") from None
143143
if self.show_progress and self.progress_bar:
144144
self.progress_bar.n = 100
145+
self.progress_bar.update(0)
146+
self.progress_bar.close()
145147
return response_json.get("response") or response_json
146148

147149
def _parse_response(self, response: requests.Response):
@@ -158,7 +160,12 @@ def _parse_response(self, response: requests.Response):
158160
and response_json.get("request_type", "sync") == "sync"
159161
):
160162
if self.show_progress:
161-
self.progress_bar = tqdm(total=100, position=0, leave=True)
163+
self.progress_bar = tqdm(
164+
total=100,
165+
position=0,
166+
leave=True,
167+
bar_format="{l_bar}{bar:100}{r_bar}{bar:-100b}",
168+
)
162169
response_json = self._get_output(
163170
response_json.get("data").get("output_url")
164171
)

0 commit comments

Comments
 (0)