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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user