- Correct asynchronous behavior in the EveAICrewAI classes.

This commit is contained in:
Josako
2025-03-31 10:26:23 +02:00
parent d57bc5cf03
commit 1762b930bc
5 changed files with 49 additions and 67 deletions

View File

@@ -13,6 +13,26 @@ GRAYLOG_PORT = int(os.environ.get('GRAYLOG_PORT', 12201))
env = os.environ.get('FLASK_ENV', 'development')
def pad_string(s, target_length=100, pad_char='-'):
"""
Pads a string with the specified character until it reaches the target length.
Args:
s: The original string
target_length: The desired total length
pad_char: Character to use for padding
Returns:
The padded string
"""
current_length = len(s)
if current_length >= target_length:
return s
padding_needed = target_length - current_length - 1
return s + " " + (pad_char * padding_needed)
class TuningLogRecord(logging.LogRecord):
"""Extended LogRecord that handles both tuning and business event logging"""
@@ -153,7 +173,7 @@ class TuningLogger:
level=level,
pathname='',
lineno=0,
msg=message,
msg=pad_string(message, 100, '-'),
args=(),
exc_info=None
)