Skip to content

Commit 183fec9

Browse files
committed
chore(local-unit): disable local unit email notification
1 parent 11593bd commit 183fec9

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

deploy/helm/ifrcgo-helm/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ cronjobs:
272272
schedule: '0 0 * * 0'
273273
- command: 'ingest_icrc'
274274
schedule: '0 3 * * 0'
275-
- command: 'notify_validators'
276-
schedule: '0 0 * * *'
275+
# - command: 'notify_validators'
276+
# schedule: '0 0 * * *'
277277
# https://github.com/jazzband/django-oauth-toolkit/blob/master/docs/management_commands.rst#cleartokens
278278
- command: 'oauth_cleartokens'
279279
schedule: '0 1 * * *'

local_units/management/commands/notify_validators.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,24 @@
44
from django.core.management.base import BaseCommand
55
from django.template.loader import render_to_string
66
from django.utils import timezone
7-
from sentry_sdk.crons import monitor
87

98
from local_units.models import LocalUnit, Validator
109
from local_units.utils import (
1110
get_email_context,
1211
get_local_unit_global_validators,
1312
get_local_unit_region_validators,
1413
)
15-
from main.sentry import SentryMonitor
14+
15+
# from main.sentry import SentryMonitor
1616
from notifications.notification import send_notification
1717

18+
# from sentry_sdk.crons import monitor
19+
1820

1921
class Command(BaseCommand):
2022
help = "Notify validators for the pending local units in different period of time"
2123

22-
@monitor(monitor_slug=SentryMonitor.NOTIFY_VALIDATORS)
24+
# @monitor(monitor_slug=SentryMonitor.NOTIFY_VALIDATORS) # NOTE: Disabled for now
2325
def handle(self, *args, **options):
2426
self.stdout.write(self.style.NOTICE("Notifying the validators..."))
2527
# NOTE: In production use standard email notification time(7days/14days),shorter delays(1day/2days) elsewhere for testing

main/sentry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class SentryMonitor(models.TextChoices):
128128
INGEST_NS_DOCUMENT = "ingest_ns_document", "0 0 * * 0"
129129
INGEST_NS_INITIATIVES = "ingest_ns_initiatives", "0 0 * * 0"
130130
INGEST_ICRC = "ingest_icrc", "0 3 * * 0"
131-
NOTIFY_VALIDATORS = "notify_validators", "0 0 * * *"
131+
# NOTIFY_VALIDATORS = "notify_validators", "0 0 * * *" # NOTE: Disable local unit email notification for now
132132
OAUTH_CLEARTOKENS = "oauth_cleartokens", "0 1 * * *"
133133

134134
@staticmethod

0 commit comments

Comments
 (0)