Skip to content

Commit 3ddd8c9

Browse files
fix: Fix/adjust periodic_tasks management command (ietf-tools#7108)
* fix: Skip midnight partial rfced sync * fix: call iana protocols update task correctly
1 parent 905b8c8 commit 3ddd8c9

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

ietf/utils/management/commands/periodic_tasks.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
"day_of_month": "*",
1313
"month_of_year": "*",
1414
"day_of_week": "0",
15+
"timezone": "America/Los_Angeles",
1516
},
1617
"daily": {
1718
"minute": "5",
1819
"hour": "0",
1920
"day_of_month": "*",
2021
"month_of_year": "*",
2122
"day_of_week": "*",
23+
"timezone": "America/Los_Angeles",
2224
},
2325
"hourly": {
2426
"minute": "5",
@@ -34,6 +36,14 @@
3436
"month_of_year": "*",
3537
"day_of_week": "*",
3638
},
39+
"every_15m_except_midnight": {
40+
"minute": "*/15",
41+
"hour": "1-23",
42+
"day_of_month": "*",
43+
"month_of_year": "*",
44+
"day_of_week": "*",
45+
"timezone": "America/Los_Angeles",
46+
},
3747
}
3848

3949

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

144154
PeriodicTask.objects.get_or_create(
145155
name="Sync with IANA protocols page",
146-
task="ietf.sync.tasks.iana_changes_update_task",
156+
task="ietf.sync.tasks.iana_protocols_update_task",
147157
defaults=dict(
148158
enabled=False,
149159
crontab=self.crontabs["hourly"],

0 commit comments

Comments
 (0)