diff --git a/helper/fairshare/fairshare_testing_util.go b/helper/fairshare/fairshare_testing_util.go index e237223635..1f65acd94d 100644 --- a/helper/fairshare/fairshare_testing_util.go +++ b/helper/fairshare/fairshare_testing_util.go @@ -14,13 +14,8 @@ type testJob struct { onFail func(error) } -// TODO maybe define these function types -func (t *testJob) GetID() string { - return t.id -} - func (t *testJob) Execute() error { - return t.ex(t.GetID()) + return t.ex(t.id) } func (t *testJob) OnFailure(err error) { diff --git a/helper/fairshare/workerpool.go b/helper/fairshare/workerpool.go index df89a0fc47..3574b131fb 100644 --- a/helper/fairshare/workerpool.go +++ b/helper/fairshare/workerpool.go @@ -12,7 +12,6 @@ import ( // Job is an interface for jobs used with this job manager type Job interface { - GetID() string Execute() error OnFailure(err error) } @@ -37,7 +36,6 @@ func (w *worker) start() { w.wg.Done() return case job := <-w.jobCh: - w.logger.Trace("starting new job", "worker", w.name, "job_id", job.GetID()) err := job.Execute() if err != nil { job.OnFailure(err) diff --git a/vault/expiration.go b/vault/expiration.go index 43e521eb57..a6db3e58bd 100644 --- a/vault/expiration.go +++ b/vault/expiration.go @@ -161,10 +161,6 @@ func newRevocationJob(nsCtx context.Context, leaseID, nsID string, m *Expiration }, nil } -func (r *revocationJob) GetID() string { - return r.leaseID -} - func (r *revocationJob) Execute() error { metrics.IncrCounterWithLabels([]string{"expire", "lease_expiration"}, 1, []metrics.Label{{"namespace", r.nsID}})