Working on CLI Implementation

This commit is contained in:
Lucas Mathews
2024-06-20 22:25:26 +02:00
parent 15c0d62523
commit a8f4a061ca
13 changed files with 333 additions and 17 deletions

View File

@@ -5,13 +5,13 @@ from class_client import Client
from class_account import Account
from class_transaction import Transaction
from emailer import EmailSendingError # Import the EmailSendingError class to handle email sending errors
from flask import jsonify, session as flask_session # Imports the Flask modules
from functools import wraps # For decorators / user login
from database import * # Importing the database connection
from emailer import send_email # Importing the emailer function
from logger import event_logger # Importing the event_logger function
from flask import session as flask_session
from flask import request
from flask import jsonify # Imports the Flask modules
from database import session
import hashlib # For password hashing
import datetime # For timestamps

View File

@@ -22,7 +22,7 @@ def clean_otp():
event_logger(f"Removed {removed_otps} expired OTPs.")
event_logger("Finished cleaning OTPs.")
schedule.every(300).seconds.do(clean_otp)
schedule.every(60).seconds.do(clean_otp)
thread = threading.Thread(target=run_schedule)
thread.daemon = True # Set the thread as a daemon thread