feat: Time delta as env var
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
# CrossFit booking credentials
|
# CrossFit booking credentials
|
||||||
CROSSFIT_USERNAME=your_username
|
CROSSFIT_USERNAME=your_username
|
||||||
CROSSFIT_PASSWORD=your_password
|
CROSSFIT_PASSWORD=your_password
|
||||||
|
TARGET_RESERVATION_TIME="20:01"
|
||||||
|
BOOKING_WINDOW_END_DELTA_MINUTES="10"
|
||||||
|
|
||||||
|
|
||||||
# Notification settings
|
# Notification settings
|
||||||
ENABLE_EMAIL_NOTIFICATIONS=true
|
ENABLE_EMAIL_NOTIFICATIONS=true
|
||||||
|
|||||||
@@ -32,8 +32,11 @@ if not all([USERNAME, PASSWORD]):
|
|||||||
APPLICATION_ID = "81560887"
|
APPLICATION_ID = "81560887"
|
||||||
CATEGORY_ID = "677" # Activity category ID for CrossFit
|
CATEGORY_ID = "677" # Activity category ID for CrossFit
|
||||||
TIMEZONE = "Europe/Paris" # Adjust to your timezone
|
TIMEZONE = "Europe/Paris" # Adjust to your timezone
|
||||||
TARGET_RESERVATION_TIME = "20:01" # When bookings open (8 PM)
|
# Booking window configuration (can be overridden by environment variables)
|
||||||
BOOKING_WINDOW_END_DELTA_MINUTES = 10 # End window book session
|
# TARGET_RESERVATION_TIME: string "HH:MM" local time when bookings open (default 20:01)
|
||||||
|
# BOOKING_WINDOW_END_DELTA_MINUTES: int minutes after target time to stop booking (default 10)
|
||||||
|
TARGET_RESERVATION_TIME = os.environ.get("TARGET_RESERVATION_TIME", "20:01")
|
||||||
|
BOOKING_WINDOW_END_DELTA_MINUTES = int(os.environ.get("BOOKING_WINDOW_END_DELTA_MINUTES", "10"))
|
||||||
DEVICE_TYPE = "3"
|
DEVICE_TYPE = "3"
|
||||||
|
|
||||||
# Retry configuration
|
# Retry configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user