Open di opened 1 year ago
Pretty rough attempt at this here: https://github.com/pypi/warehouse/compare/main...di:warehouse:fix-12582?expand=1
One of the challenges is that it's difficult to pass information between the task creation and the time when the task is actually run.
@ewdurbin found a clever workaround to avoid passing the call counter around: https://stackoverflow.com/a/34290849, but we still need a good way to configure the "debounce key" in code, and then also have that available to the task at runtime.
Right now, our task queue supports 1:1 events - one task fired results in one 'action' occuring.
For a number of reasons, it would be interesting to explore 'debouncing' these events: either queuing them up and aggregating them into a single 'action', or ensuring that a given 'action' doesn't happen multiple times within a given time period.
Previous chat history between maintainers on the subject included below is specific to emails, but debouncing tasks like purges may be a way to improve https://github.com/pypi/warehouse/issues/12214.
@di:
@dstufft:
@di:
@dstufft:
@di: