mirror of
https://github.com/Bostame/onboarding_system.git
synced 2025-12-05 23:45:28 +01:00
minor bug fixes
This commit is contained in:
6
main.py
6
main.py
@@ -19,6 +19,10 @@ import re
|
|||||||
# Load environment variables from .env file
|
# Load environment variables from .env file
|
||||||
load_dotenv(dotenv_path=Path(__file__).parent / 'env' / '.env')
|
load_dotenv(dotenv_path=Path(__file__).parent / 'env' / '.env')
|
||||||
|
|
||||||
|
# Load the sync interval from the environment or set a default (in seconds)
|
||||||
|
SYNC_INTERVAL = int(os.getenv('SYNC_INTERVAL', 60)) # Default is 60 seconds
|
||||||
|
|
||||||
|
|
||||||
# Retrieve secret credentials and directories from environment variables
|
# Retrieve secret credentials and directories from environment variables
|
||||||
IMAP_SERVER = os.getenv('IMAP_SERVER')
|
IMAP_SERVER = os.getenv('IMAP_SERVER')
|
||||||
SMTP_SERVER = os.getenv('SMTP_SERVER')
|
SMTP_SERVER = os.getenv('SMTP_SERVER')
|
||||||
@@ -273,4 +277,4 @@ def countdown_timer(seconds):
|
|||||||
# Continuously check for new emails every 30 seconds
|
# Continuously check for new emails every 30 seconds
|
||||||
while True:
|
while True:
|
||||||
check_email_for_csv()
|
check_email_for_csv()
|
||||||
countdown_timer(30)
|
countdown_timer(SYNC_INTERVAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user