insights: split query runner job into a separate worker job
Created by: leonore
closes #23053 (closed).
Test plan
All worker jobs initialise correctly when running sg start enterprise-codeinsights
. Then:
- Create an insight that runs over all repos
- Connect to the sg db (in my case,
psql -h localhost -p 5432 -U sourcegraph
) - Observe the query has been run to completion by the worker (
SELECT * from insights_query_runner_jobs;
)