|
|
|
|
@ -6,7 +6,6 @@ package census
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"fmt"
|
|
|
|
|
"io"
|
|
|
|
|
|
|
|
|
|
"github.com/hashicorp/boundary/internal/db"
|
|
|
|
|
"github.com/hashicorp/boundary/internal/errors"
|
|
|
|
|
@ -15,7 +14,7 @@ import (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// RegisterJob registers the census job with the provided scheduler.
|
|
|
|
|
func RegisterJob(ctx context.Context, s *scheduler.Scheduler, lurEnabled bool, r db.Reader, w db.Writer, randomReader io.Reader) error {
|
|
|
|
|
func RegisterJob(ctx context.Context, s *scheduler.Scheduler, lurEnabled bool, r db.Reader, w db.Writer) error {
|
|
|
|
|
const op = "census.RegisterJob"
|
|
|
|
|
if s == nil {
|
|
|
|
|
return errors.New(ctx, errors.InvalidParameter, "nil scheduler", op, errors.WithoutEvent())
|
|
|
|
|
@ -27,7 +26,7 @@ func RegisterJob(ctx context.Context, s *scheduler.Scheduler, lurEnabled bool, r
|
|
|
|
|
return errors.New(ctx, errors.Internal, "nil DB writer", op, errors.WithoutEvent())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
censusJob, err := NewCensusJobFn(ctx, lurEnabled, r, w, randomReader)
|
|
|
|
|
censusJob, err := NewCensusJobFn(ctx, lurEnabled, r, w)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return fmt.Errorf("error creating census job: %w", err)
|
|
|
|
|
}
|
|
|
|
|
|