Files
query-orchestration/api/querySyncRunner/runner.go
T
Michael McGuinness fee71e7740 Merged in feature/postprocessing (pull request #114)
Feature/postprocessing

* tests

* passtest

* fixshorttests

* mosttests

* improvingbasedockerfile

* testspeeds

* testing

* host

* canparallel

* clean

* passfullsuite

* singlepagemax

* test

* findfeatures

* findstables

* tbls

* tablestoo

* tablestoo

* lateraltests

* tableloc

* cleanup

* inlinetable

* childids

* cleanup

* tests
2025-04-22 14:40:16 +00:00

41 lines
629 B
Go

package querysyncrunner
import (
"context"
"log/slog"
querysync "queryorchestration/internal/query/sync"
"github.com/google/uuid"
)
const Name = "querySyncRunner"
type Services struct {
QuerySync *querysync.Service
}
type Runner struct {
svc *Services
}
func New(svc *Services) Runner {
return Runner{
svc: svc,
}
}
type Body struct {
DocumentID uuid.UUID `json:"id" validate:"required,uuid"`
}
func (s *Runner) Process(ctx context.Context, body Body) bool {
err := s.svc.QuerySync.Sync(ctx, body.DocumentID)
if err != nil {
slog.Error("unable to process", "error", err)
return false
}
return true
}