Nicolas Wagner commited on
Commit
6a8a748
·
1 Parent(s): e3f4399

2 sec sub

Browse files
Files changed (1) hide show
  1. src/submission/submit_csv.py +4 -6
src/submission/submit_csv.py CHANGED
@@ -107,14 +107,12 @@ def check_rate_limit(team_name: str) -> tuple[bool, str]:
107
  now = datetime.now(timezone.utc)
108
  time_diff = now - last_time
109
 
110
- if time_diff < timedelta(hours=6):
111
- remaining_seconds = (timedelta(hours=6) - time_diff).total_seconds()
112
- remaining_hours = int(remaining_seconds // 3600)
113
- remaining_minutes = int((remaining_seconds % 3600) // 60)
114
- remaining_secs = int(remaining_seconds % 60)
115
  return (
116
  False,
117
- f"Rate limit exceeded. Please wait {remaining_hours} hours, {remaining_minutes} minutes and {remaining_secs} seconds before submitting again.",
118
  )
119
 
120
  return True, ""
 
107
  now = datetime.now(timezone.utc)
108
  time_diff = now - last_time
109
 
110
+ if time_diff < timedelta(seconds=2):
111
+ remaining_seconds = (timedelta(seconds=2) - time_diff).total_seconds()
112
+ remaining_secs = int(remaining_seconds)
 
 
113
  return (
114
  False,
115
+ f"Rate limit exceeded. Please wait {remaining_secs} seconds before submitting again.",
116
  )
117
 
118
  return True, ""