Skip to content

Commit

Permalink
fix: Fix/adjust periodic_tasks management command (#7108)
Browse files Browse the repository at this point in the history
* fix: Skip midnight partial rfced sync

* fix: call iana protocols update task correctly
  • Loading branch information
jennifer-richards committed Feb 28, 2024
1 parent 905b8c8 commit 3ddd8c9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions ietf/utils/management/commands/periodic_tasks.py
Expand Up @@ -12,13 +12,15 @@
"day_of_month": "*",
"month_of_year": "*",
"day_of_week": "0",
"timezone": "America/Los_Angeles",
},
"daily": {
"minute": "5",
"hour": "0",
"day_of_month": "*",
"month_of_year": "*",
"day_of_week": "*",
"timezone": "America/Los_Angeles",
},
"hourly": {
"minute": "5",
Expand All @@ -34,6 +36,14 @@
"month_of_year": "*",
"day_of_week": "*",
},
"every_15m_except_midnight": {
"minute": "*/15",
"hour": "1-23",
"day_of_month": "*",
"month_of_year": "*",
"day_of_week": "*",
"timezone": "America/Los_Angeles",
},
}


Expand Down Expand Up @@ -79,7 +89,7 @@ def create_default_tasks(self):
kwargs=json.dumps(dict(full_index=False)),
defaults=dict(
enabled=False,
crontab=self.crontabs["every_15m"],
crontab=self.crontabs["every_15m_except_midnight"], # don't collide with full sync
description=(
"Reparse the last _year_ of RFC index entries until "
"https://github.com/ietf-tools/datatracker/issues/3734 is addressed. "
Expand Down Expand Up @@ -143,7 +153,7 @@ def create_default_tasks(self):

PeriodicTask.objects.get_or_create(
name="Sync with IANA protocols page",
task="ietf.sync.tasks.iana_changes_update_task",
task="ietf.sync.tasks.iana_protocols_update_task",
defaults=dict(
enabled=False,
crontab=self.crontabs["hourly"],
Expand Down

0 comments on commit 3ddd8c9

Please sign in to comment.