sourcegraph/cmd/worker
Erik Seliger d23e2bfd52
gitserver: Implement Perforce changelist ID mapper as standalone job (#62868)
This PR moves the changelist mapper to be a proper worker job and be monitored by the usual worker monitoring.
It also makes use of well-tested gitserver APIs instead of running git commands itself.

This also moves from a reactive system that purely resides in memory to a system that occasionally makes sure all perforce depots are properly mapped. This should be slightly more DB queries to find the depots that have a change, but it shouldn't be a huge burden, and this is another good indicator that events can be useful :)

Test plan:

I've added some "integration-ish" tests, and ran it locally to verify that it works.
It will be good to also implement an integration test, once we have the tools for that.
2024-05-27 10:00:31 +08:00
..
internal gitserver: Implement Perforce changelist ID mapper as standalone job (#62868) 2024-05-27 10:00:31 +08:00
job bazel: introduce build files for Go (#46770) 2023-01-23 14:00:01 +01:00
shared gitserver: Implement Perforce changelist ID mapper as standalone job (#62868) 2024-05-27 10:00:31 +08:00
BUILD.bazel Publish sourcegraph-base image (#62002) 2024-04-19 14:44:06 +01:00
CODENOTIFY codenotify: dr. fritz is kil (#57313) 2023-10-03 16:19:55 +00:00
image_test.yaml Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
main.go remove more remannts of OSS build (#58253) 2023-11-10 07:59:03 +00:00
README.md worker: Add docs (#21924) 2021-06-17 16:19:04 +00:00

Worker

The worker service is a collection of the background jobs performed by a Sourcegraph instance. Jobs registered to the worker will run periodically or in response to some event read from the database.