-
Notifications
You must be signed in to change notification settings - Fork 79
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
[feat] Dynamic jobs #33
Comments
Just from my little investigation, would using bree.add(..) work? |
Hi @ggb88 , first of all, thanks... |
I did find a possible solution, |
@niftylettuce this could be a very useful/great feature for the library, there is a better way to do this? |
@corzani Can you share a rough example of how you're achieving this? I'm exploring options along the same lines as your approach. Thanks! |
@tamaker {
name: 'task1',
worker: {
workerData: {
foo: 'something',
fie: 'something else'
}
} Considering the case above you can retrieve those properties from your job ( const { workerData } = require('worker_threads');
console.dir(workerData); // This is what you need See https://nodejs.org/api/worker_threads.html#worker_threads_worker_workerdata I did notice the following method when I was looking for an example (2 mins ago)... So currently you might have 2 ways to do it... |
Hi,
is there a way to create a dynamic set of jobs? How can I pass custom parameters to a job?
I was wondering if a similar approach to the following one can be used...
Thanks
The text was updated successfully, but these errors were encountered: