Skip to content

Commit

Permalink
Removed network error for default done statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
volbil committed May 20, 2024
1 parent 5b46564 commit eb9a4fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 3 additions & 1 deletion kibun/backend/aio/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ async def request_aio(session, endpoint, task):

attempts += 1

logger.error(f"Request failed {endpoint} {status} ({attempts})")
# There is no need to spam generic error messages
if status not in [constants.NETWORK_ERROR]:
logger.error(f"Request failed {endpoint} {status} ({attempts})")

if task.sleep > 0:
await asyncio.sleep(task.sleep)
Expand Down
3 changes: 0 additions & 3 deletions kibun/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ def create_task(
error_markers=constants.DEFAULT_MARKERS,
headers=None,
):
if constants.NETWORK_ERROR not in done_status:
done_status.append(constants.NETWORK_ERROR)

if constants.NETWORK_ERROR not in retry_status:
retry_status.append(constants.NETWORK_ERROR)

Expand Down

0 comments on commit eb9a4fb

Please sign in to comment.