Erwin Jacimino hai 8 meses
pai
achega
0bd16b35ca
Modificáronse 3 ficheiros con 22 adicións e 23 borrados
  1. 13 13
      requirements.txt
  2. 3 4
      services/email_service.py
  3. 6 6
      services/print_service.py

+ 13 - 13
requirements.txt

@@ -1,14 +1,14 @@
-cryptography==45.0.6
-fastapi==0.116.1
-h11==0.16.0
-httpx==0.28.1
+cryptography
+fastapi
+h11
+httpx
 python-jose[cryptography]
-openai==1.101.0
-passlib==1.7.4
-psycopg2==2.9.10
-pydantic==2.11.7
-python-dotenv==1.1.1
-redis==6.4.0
-Requests==2.32.5
-starlette==0.47.3
-uvicorn==0.35.0
+openai
+passlib
+psycopg2
+pydantic
+python-dotenv
+redis
+Requests
+starlette
+uvicorn

+ 3 - 4
services/email_service.py

@@ -80,13 +80,12 @@ class EmailSender:
         except smtplib.SMTPAuthenticationError as e:
             error_msg = f"SMTP authentication failed: {e}"
             logger.error(error_msg)
-            
-            raise
+            raise e
         except Exception as e:
-            error_msg = f"Failed to establish SMTP connection: {e}"
+            error_msg = f"Failed to establish SMTP connection: {e}\n line: {e.__traceback__.tb_lineno}"
             logger.error(error_msg)
             
-            raise
+            raise e
 
     def close(self):
         """Close SMTP connection and stop queue worker"""

+ 6 - 6
services/print_service.py

@@ -12,14 +12,14 @@ user_data_service = DataServiceFactory.get_user_service()
 def get_printer_url(location: Locations) -> str:
     if DEVELOPMENT:
         return "http://localhost:5005"
-    if location == Locations.PIZZAS:
-        return "http://localhost:6002"
-    elif location == Locations.BURGUER:
-        return "http://localhost:6004"
+    if location == Locations.BAR:
+        return "http://localhost:6010"
     elif location == Locations.COCTELERY:
-        return "http://localhost:6000"
+        return "http://localhost:6012"
+    elif location == Locations.PIZZAS:
+        return "http://localhost:6014"
     else:
-        return "http://localhost:6000"
+        return "http://localhost:6016"
 
 def print_order(order: Order, location:Locations ):
     """Send order to printer"""