Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: opitmize compute repeatJobKey #2596

Closed
1 task done
Gumplefik opened this issue Jun 7, 2024 · 0 comments
Closed
1 task done

[Bug]: opitmize compute repeatJobKey #2596

Gumplefik opened this issue Jun 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Gumplefik
Copy link

Version

v4.10.0

Platform

NodeJS

What happened?

getRepeatKey should support more options.Think about this example:

  1. We have define a task to notify people in Monday and Tuesday and we have register it as a worker which named notify.
function notify(receiver: string, message: string) {
 // ...
}
  1. We add different job
queue.add("notify", ["xxx", "hello"], {
  repeat: {
    pattern: "0 10 1,2 * *"
  }
})
queue.add("notify", ["zzz", "hello"], {
  repeat: {
    pattern: "0 10 1,2 * *"
  }
})
  1. But actually we have one job because these jobs have same repeatKey. These jobs have different parameters, so maybe they should be treat as different job.

Maybe some considerations should have different style like bold, so we are easy to notice these things.
repeatable
Also we can support custom way to compute a repeatKey

How to reproduce.

support custom getRepeatKey function

function customGetRepeatKey(name, data, repeatOpts) {
return ''
}

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Gumplefik Gumplefik added the bug Something isn't working label Jun 7, 2024
github-actions bot pushed a commit that referenced this issue Jul 16, 2024
# [5.10.0](v5.9.0...v5.10.0) (2024-07-16)

### Features

* **repeatable:** new repeatables structure ([#2617](#2617)) ref [#2612](#2612) fixes [#2399](#2399) [#2596](#2596) ([8376a9a](8376a9a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants