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
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