major refactor, replace ovpn.zip file, leverage API instead.

This commit is contained in:
2024-09-11 08:33:47 -05:00
parent be53726479
commit 5b0c2c9038
3 changed files with 160 additions and 55 deletions

View File

@@ -23,7 +23,7 @@ def connect_to_database():
cursor = conn.cursor()
return conn, cursor
def should_skip_file(cursor, filename):
def should_skip_file(cursor, filename, index, server_count, debug_print):
"""
Checks if the given OVPN file should be skipped based on the last check time in the database.
Returns True if it should be skipped, False otherwise.
@@ -33,7 +33,7 @@ def should_skip_file(cursor, filename):
row = cursor.fetchone()
if row is None:
print(f"No record found for {filename} in the database.")
debug_print(f"{datetime.datetime.now()} [{index}/{server_count}] [{filename}]: Skipping OpenVPN TCP Dedicated server.")
return False # No record found, so don't skip
last_check = row[0]