mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-09-18 08:35:44 +08:00
15 lines
184 B
Go
15 lines
184 B
Go
package cron
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
lockLeaseTTL = time.Second * 300
|
|
)
|
|
|
|
type Locker interface {
|
|
ExecuteWithLock(ctx context.Context, taskName string, task func())
|
|
}
|