Refactor calendar sync to prioritize oldest synced employees with human-readable timestamps
This commit is contained in:
@@ -33,9 +33,9 @@ FETCH_TO = f"{current_year + 9}-12-31T23:59:59" # End of 9 years ahead
|
||||
|
||||
# Constants: Für 600/min -> 600 Tokens, Refill 600/60=10 pro Sekunde -> 10/1000 pro ms
|
||||
RATE_LIMIT_KEY = 'google_calendar_api_tokens'
|
||||
MAX_TOKENS = 5
|
||||
REFILL_RATE_PER_MS = 2 / 1000 # Float nur hier; Ops mit Integers
|
||||
MIN_WAIT = 0.2 # 200ms
|
||||
MAX_TOKENS = 7
|
||||
REFILL_RATE_PER_MS = 7 / 1000 # Float nur hier; Ops mit Integers
|
||||
MIN_WAIT = 0.1 # 100ms
|
||||
JITTER_MAX = 0.1 # Optional: Zufalls-Delay 0-100ms für Glättung
|
||||
|
||||
async def enforce_global_rate_limit(context=None):
|
||||
|
||||
Reference in New Issue
Block a user