debug
This commit is contained in:
@@ -29,6 +29,19 @@ from difflib import SequenceMatcher
|
||||
import unicodedata
|
||||
import csv
|
||||
|
||||
|
||||
def retry_on_failure(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
for attempt in range(Config.MAX_RETRIES):
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except Exception as e:
|
||||
print(f"⚠️ Fehler bei {func.__name__} (Versuch {attempt+1}): {str(e)[:100]}")
|
||||
time.sleep(Config.RETRY_DELAY)
|
||||
return None
|
||||
return wrapper
|
||||
|
||||
|
||||
# Optional: tiktoken für Token-Zählung (Modus 8)
|
||||
try:
|
||||
import tiktoken
|
||||
|
||||
Reference in New Issue
Block a user