Skip to content

Commit

Permalink
feat(danmaku): add retry
Browse files Browse the repository at this point in the history
  • Loading branch information
hldh214 committed Apr 29, 2021
1 parent f4450c6 commit 4243f2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recorder/utils/huya_danmaku.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import arrow
import cachetools
import jwt
import tenacity
import websockets

do_not_pad_flag = '-'
Expand Down Expand Up @@ -110,6 +111,7 @@ async def consumer_handler(websocket, output_path, iat):
last_context['contents'] = content_list


@tenacity.retry(stop=tenacity.stop_after_attempt(3), wait=tenacity.wait_fixed(3))
def main(room_id, output_path, app_id, app_secret):
asyncio.run(subscribe(room_id, output_path, app_id, app_secret))

Expand Down

0 comments on commit 4243f2c

Please sign in to comment.