Make API extension print its exceptions

This commit is contained in:
oobabooga 2023-04-25 23:23:47 -03:00
parent f642135517
commit 68ed73dd89

View File

@ -1,7 +1,8 @@
from threading import Thread
import time import time
import traceback
from threading import Thread
from typing import Callable, Optional from typing import Callable, Optional
from modules.text_generation import encode from modules.text_generation import encode
@ -64,6 +65,7 @@ def _start_cloudflared(port: int, max_attempts: int = 3, on_start: Optional[Call
return return
except Exception: except Exception:
traceback.print_exc()
time.sleep(3) time.sleep(3)
raise Exception('Could not start cloudflared.') raise Exception('Could not start cloudflared.')