mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-06 11:35:49 +00:00
fix: print message before sleep
This commit is contained in:
parent
f566feabcb
commit
cf44a19d82
@ -47,8 +47,8 @@ class ChatGPTAPI(Base):
|
|||||||
# 2. an apikey has no money or reach limit, don’t sleep, just replace it with another apikey
|
# 2. an apikey has no money or reach limit, don’t sleep, just replace it with another apikey
|
||||||
# 3. all apikey reach limit, then use current sleep
|
# 3. all apikey reach limit, then use current sleep
|
||||||
sleep_time = int(60 / self.key_len)
|
sleep_time = int(60 / self.key_len)
|
||||||
time.sleep(sleep_time)
|
|
||||||
print(e, f"will sleep {sleep_time} seconds")
|
print(e, f"will sleep {sleep_time} seconds")
|
||||||
|
time.sleep(sleep_time)
|
||||||
|
|
||||||
t_text = self.get_translation(text)
|
t_text = self.get_translation(text)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user