This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Description
Right now the Code Insights background workers will enqueue search queries to be executed at a given interval, and we enforce that the timeout on searches is below that interval to promise the queue does not grow unbounded (e.g. if a search takes longer than the interval we enqueue at).
https://github.com/sourcegraph/sourcegraph/pull/18267#discussion_r576237553
This could be improved by adding backpressure such as through only enqueuing new insights from the enqueuer, and having the worker itself enqueue the next job.