@@ -262,6 +262,7 @@ def schedule_invalidate_project_config(
262262 organization_id = None ,
263263 project_id = None ,
264264 public_key = None ,
265+ countdown = 5 ,
265266 transaction_db = None ,
266267):
267268 """Schedules the :func:`invalidate_project_config` task.
@@ -287,12 +288,15 @@ def schedule_invalidate_project_config(
287288 >>> )
288289
289290 If there is no active database transaction open for the provided ``transaction_db``,
290- the project config task is scheduled immediately.
291+ the project config task is executed immediately.
291292
292293 :param trigger: The reason for the invalidation. This is used to tag metrics.
293294 :param organization_id: Invalidates all project keys for all projects in an organization.
294295 :param project_id: Invalidates all project keys for a project.
295296 :param public_key: Invalidate a single public key.
297+ :param countdown: The time to delay running this task in seconds. Normally there is a
298+ slight delay to increase the likelihood of deduplicating invalidations but you can
299+ tweak this, like e.g. the :func:`invalidate_all` task does.
296300 :param transaction_db: The database currently being used by an active transaction.
297301 This directs the on_commit handler for the task to the correct transaction.
298302 """
@@ -316,6 +320,7 @@ def schedule_invalidate_project_config(
316320 organization_id = organization_id ,
317321 project_id = project_id ,
318322 public_key = public_key ,
323+ countdown = countdown ,
319324 ),
320325 using = transaction_db ,
321326 )
@@ -327,6 +332,7 @@ def _schedule_invalidate_project_config(
327332 organization_id = None ,
328333 project_id = None ,
329334 public_key = None ,
335+ countdown = 5 ,
330336):
331337 """For param docs, see :func:`schedule_invalidate_project_config`."""
332338 from sentry .models .project import Project
@@ -375,6 +381,7 @@ def _schedule_invalidate_project_config(
375381 )
376382
377383 invalidate_project_config .apply_async (
384+ countdown = countdown ,
378385 kwargs = {
379386 "project_id" : project_id ,
380387 "organization_id" : organization_id ,
0 commit comments