Update main.py

fixed log bug
This commit is contained in:
Saifeddine ALOUI 2024-01-16 11:26:46 +01:00 committed by GitHub
parent a809d8523a
commit 6e65013479
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -120,6 +120,7 @@ def main():
# Apply the queuing mechanism only for a specific endpoint.
if path == '/api/generate':
que = min_queued_server[1]['queue']
client_ip, client_port = self.client_address
self.add_access_log_entry(user=self.user, ip_address=client_ip, access="Authorized", server=min_queued_server[0])
que.put_nowait(1)
try: