Add base.LeaseKey helper function

This commit is contained in:
Ken Hibino
2022-02-08 05:53:42 -08:00
parent 5490d2c625
commit 852af7abd1
2 changed files with 22 additions and 0 deletions

View File

@@ -141,6 +141,11 @@ func DeadlinesKey(qname string) string {
return fmt.Sprintf("%sdeadlines", QueueKeyPrefix(qname))
}
// LeaseKey returns a redis key for the lease.
func LeaseKey(qname string) string {
return fmt.Sprintf("%slease", QueueKeyPrefix(qname))
}
func CompletedKey(qname string) string {
return fmt.Sprintf("%scompleted", QueueKeyPrefix(qname))
}