Skip to content

Commit

Permalink
fix: catch more asyncio errors
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Jan 29, 2024
1 parent 3f5cc76 commit 637fd6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion horde_worker_regen/process_management/process_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from multiprocessing.synchronize import Lock as Lock_MultiProcessing
from multiprocessing.synchronize import Semaphore
from asyncio.exceptions import TimeoutError as AsyncioTimeoutError
from aiohttp.client_exceptions import ClientOSError as AsyncioClientOSError

import aiohttp
import PIL
Expand Down Expand Up @@ -1684,7 +1685,7 @@ async def submit_single_generation(self, new_submit: PendingSubmitJob) -> Pendin
logger.error(f"Failed to upload image to R2: {response}")
new_submit.retry()
return new_submit
except (TimeoutError, AsyncioTimeoutError):
except (TimeoutError, AsyncioTimeoutError, AsyncioClientOSError):
logger.warning("Generation Submit to AI Horde timed out. Will retry.")
new_submit.retry()
return new_submit
Expand Down

0 comments on commit 637fd6b

Please sign in to comment.