mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
29 lines
697 B
Go
29 lines
697 B
Go
package codeintel
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/sourcegraph/sourcegraph/cmd/worker/job"
|
|
"github.com/sourcegraph/sourcegraph/internal/codeintel/uploads/background/commitgraph"
|
|
"github.com/sourcegraph/sourcegraph/internal/env"
|
|
"github.com/sourcegraph/sourcegraph/internal/goroutine"
|
|
)
|
|
|
|
type commitGraphUpdaterJob struct{}
|
|
|
|
func NewCommitGraphUpdaterJob() job.Job {
|
|
return &commitGraphUpdaterJob{}
|
|
}
|
|
|
|
func (j *commitGraphUpdaterJob) Config() []env.Config {
|
|
return []env.Config{
|
|
commitgraph.ConfigInst,
|
|
}
|
|
}
|
|
|
|
func (j *commitGraphUpdaterJob) Routines(ctx context.Context) ([]goroutine.BackgroundRoutine, error) {
|
|
return []goroutine.BackgroundRoutine{
|
|
commitgraph.NewUpdater(),
|
|
}, nil
|
|
}
|