2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-26 11:16:12 +08:00

feat: add custom unique key option

This commit is contained in:
nyako
2022-06-24 14:55:53 +08:00
parent a04ba6411d
commit 519985f195
4 changed files with 85 additions and 2 deletions

View File

@@ -945,6 +945,12 @@ func parseOption(s string) (Option, error) {
return nil, err
}
return Unique(d), nil
case "UniqueKey":
key, err := strconv.Unquote(arg)
if err != nil {
return nil, err
}
return UniqueKey(key), nil
case "ProcessAt":
t, err := time.Parse(time.UnixDate, arg)
if err != nil {