Rsnarsna commited on
Commit
82e0d49
·
verified ·
1 Parent(s): 6ae4845

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
20
  # Email and database configuration
21
  DB_CONFIG = {
22
  'host': '0.tcp.in.ngrok.io',
23
- 'port': 14458,
24
  'user': 'root',
25
  'password': '',
26
  'database': 'shipment_details'
@@ -138,7 +138,7 @@ def insert_data(extracted_details):
138
  'quantities', 'carrier_details'
139
  ]
140
  if all(extracted_details.get(field) in ["", None] for field in required_fields):
141
- logger.info("Skipping insertion: All extracted values are empty.")
142
  return
143
 
144
  # Insert data into database
@@ -166,7 +166,7 @@ def insert_data(extracted_details):
166
  )
167
  cursor.execute(sql, values)
168
  mydb.commit()
169
- logger.info("Data inserted successfully.")
170
 
171
  except mysql.connector.Error as db_err:
172
  logger.error(f"Database error: {db_err}")
 
20
  # Email and database configuration
21
  DB_CONFIG = {
22
  'host': '0.tcp.in.ngrok.io',
23
+ 'port': 11248,
24
  'user': 'root',
25
  'password': '',
26
  'database': 'shipment_details'
 
138
  'quantities', 'carrier_details'
139
  ]
140
  if all(extracted_details.get(field) in ["", None] for field in required_fields):
141
+ print("Skipping insertion: All extracted values are empty.")
142
  return
143
 
144
  # Insert data into database
 
166
  )
167
  cursor.execute(sql, values)
168
  mydb.commit()
169
+ print("Data inserted successfully.")
170
 
171
  except mysql.connector.Error as db_err:
172
  logger.error(f"Database error: {db_err}")