major refactor, replace ovpn.zip file, leverage API instead.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user