From cbdc152a170f10d6f3440ce300a486c87a0ec0f5 Mon Sep 17 00:00:00 2001 From: Adriano Caloiaro Date: Mon, 5 Sep 2022 09:17:44 -0700 Subject: [PATCH] Extend worker.Worker to support periodic job registration --- worker/worker.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worker/worker.go b/worker/worker.go index 36fc0262a..9f07caffc 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 + // PeriodicallyPerform 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