You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

reward_redis_key.go 587 B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021
  1. package redis_key
  2. import (
  3. "code.gitea.io/gitea/modules/setting"
  4. "fmt"
  5. "strings"
  6. )
  7. const REWARD_REDIS_PREFIX = "reward"
  8. func RewardOperateLock(requestId string, sourceType string, operateType string) string {
  9. return KeyJoin(REWARD_REDIS_PREFIX, requestId, sourceType, operateType, "send")
  10. }
  11. func RewardOperateNotification() string {
  12. return KeyJoin(REWARD_REDIS_PREFIX, "operate", strings.ReplaceAll(setting.AppURL, "/", ""), "notification")
  13. }
  14. func RewardTaskRunningLock(taskId int64) string {
  15. return KeyJoin(REWARD_REDIS_PREFIX, "periodic_task", fmt.Sprint(taskId), "lock")
  16. }