Spaces:
Running
Running
fixed last_sent_time global issue
Browse files
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()
|