We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d3cb35 commit 7baba32Copy full SHA for 7baba32
modules/cron/cron.go
@@ -29,11 +29,11 @@ var c = cron.New()
29
// Prevent duplicate running tasks.
30
var taskStatusTable = sync.NewStatusTable()
31
32
-// CronFunc defines a cron function
33
-type CronFunc func()
+// Func defines a cron function body
+type Func func()
34
35
// WithUnique wrap a cron func with an unique running check
36
-func WithUnique(name string, body CronFunc) CronFunc {
+func WithUnique(name string, body Func) Func {
37
return func() {
38
if !taskStatusTable.StartIfNotRunning(name) {
39
return
0 commit comments