diff --git a/worker/simple.go b/worker/simple.go index 55227342e..92af4f0aa 100644 --- a/worker/simple.go +++ b/worker/simple.go @@ -196,6 +196,11 @@ func (w *Simple) PerformIn(job Job, d time.Duration) error { return nil } +// RegisterPeriodic is currently a no-op and should be implemented +func (w *Simple) RegisterPeriodic(cronSpec, jobName string, h Handler) error { + return nil +} + // SimpleLogger is used by the Simple worker to write logs type SimpleLogger interface { Debugf(string, ...interface{}) diff --git a/worker/worker.go b/worker/worker.go index 36fc0262a..ee7cc369c 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -24,6 +24,8 @@ type Worker interface { PerformIn(Job, time.Duration) error // Register a Handler Register(string, Handler) error + // RegisterPeriodic performs a job periodically according to the provided cron spec + RegisterPeriodic(cronSpec, jobName string, h Handler) error } /* TODO(sio4): #road-to-v1 - redefine Worker interface clearer