File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
local_units/management/commands Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff 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 * * *'
Original file line number Diff line number Diff line change 44from django .core .management .base import BaseCommand
55from django .template .loader import render_to_string
66from django .utils import timezone
7- from sentry_sdk .crons import monitor
87
98from local_units .models import LocalUnit , Validator
109from 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
1616from notifications .notification import send_notification
1717
18+ # from sentry_sdk.crons import monitor
19+
1820
1921class 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments