Skip to content

Commit 4fd357f

Browse files
committed
Add commet about reasoning why we update commitfests in this kinda weird way
1 parent 975e365 commit 4fd357f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

pgcommitfest/commitfest/models.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,19 @@ def _refresh_relevant_commitfests(cls, for_update):
164164

165165
@classmethod
166166
def relevant_commitfests(cls, for_update=False, refresh=True):
167+
"""If refresh is True (which is the default) this will automatically
168+
update the commitfests if their state is out of date. It will also
169+
create a new ones automatically when needed.
170+
171+
The primary reason this refreshing is not done through a cron job is
172+
that that requires work on the infrastructure side. Which is a huge
173+
hassle to make happen in practice, due to an overloaded infrastructure
174+
team.
175+
176+
Luckily checking if a refresh is needed is very cheap, just a few
177+
comparisons (see _are_relevant_commitfests_up_to_date for details). And
178+
the actual updates only happen ~once a month.
179+
"""
167180
if refresh and settings.AUTO_CREATE_COMMITFESTS:
168181
return cls._refresh_relevant_commitfests(for_update=for_update)
169182

0 commit comments

Comments
 (0)