Pranesh64 commited on
Commit
67b09e9
·
verified ·
1 Parent(s): 5465bb9

fixed last_sent_time global issue

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -679,11 +679,10 @@ def send_notifications_for_events(new_events):
679
  import time
680
 
681
  send_lock = threading.Lock()
682
- last_sent_time = 0
683
 
684
 
685
  def rate_limited_send(mail, subject, html):
686
- global last_sent_time
687
 
688
  with send_lock:
689
  now = time.time()
 
679
  import time
680
 
681
  send_lock = threading.Lock()
682
+ last_sent_time = [0]
683
 
684
 
685
  def rate_limited_send(mail, subject, html):
 
686
 
687
  with send_lock:
688
  now = time.time()