summaryrefslogtreecommitdiff
path: root/postgresqleu/views.py
diff options
context:
space:
mode:
authorMagnus Hagander2024-05-14 11:46:20 +0000
committerMagnus Hagander2024-05-14 11:46:20 +0000
commit3d08134db0fe1c83d38b211ae400e26bede847c9 (patch)
tree02d7fe667ea9388c38945f83746a989f5a4e2311 /postgresqleu/views.py
parent02db86980bab9c9389f1c2b965615331baba8d6b (diff)
Complete the sendtime handling for mailqueue
Sync up the "warning button" filtering with that of the alerts, which means we don̈́'t alert for emails that aren't supposed to be sent yet. This becomes more relevant as we also stop trying to send emails that are set to be sent in the future, in preparation for upcoming functionality to schedule email sending.
Diffstat (limited to 'postgresqleu/views.py')
-rw-r--r--postgresqleu/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/views.py b/postgresqleu/views.py
index 63484b70..68bc9360 100644
--- a/postgresqleu/views.py
+++ b/postgresqleu/views.py
@@ -176,7 +176,7 @@ def admin_dashboard(request):
'pending_refunds': pending_refunds,
'bank_file_uploads': bank_file_uploads,
'schedalert': conditional_exec_to_scalar(request.user.is_superuser, "SELECT NOT EXISTS (SELECT 1 FROM pg_stat_activity WHERE application_name='pgeu scheduled job runner' AND datname=current_database())"),
- 'mailqueuealert': conditional_exec_to_scalar(request.user.is_superuser, "SELECT EXISTS (SELECT 1 FROM mailqueue_queuedmail LIMIT 1)"),
+ 'mailqueuealert': conditional_exec_to_scalar(request.user.is_superuser, "SELECT EXISTS (SELECT 1 FROM mailqueue_queuedmail WHERE sendtime < now())"),
'meetingserver': settings.ENABLE_MEMBERSHIP and settings.MEETINGS_STATUS_BASE_URL,
})