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

Deprecate the processors module option #95

Closed
fwoelffel opened this issue May 28, 2019 · 5 comments
Closed

Deprecate the processors module option #95

fwoelffel opened this issue May 28, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@fwoelffel
Copy link
Contributor

The BullModuleOptions.processors property has become redundant since the implementation of the decorators which provide a more elegant solution.
I should deprecate this ASAP and remove this property in a future release to reduce the code complexity.

@fwoelffel fwoelffel added the enhancement New feature or request label May 28, 2019
@fwoelffel fwoelffel self-assigned this May 28, 2019
@victordidenko
Copy link

victordidenko commented Jul 16, 2019

@fwoelffel Before removing processors property, please, provide an example, how to run job handlers in separate processes (using file name) with decorators approach

@fwoelffel
Copy link
Contributor Author

Oopsie, I totally forgot about that feature. I'll come back to you with a proper implementation / example.

@igor-sky
Copy link

@fwoelffel Is example available anywhere? Completely stuck on this one, can't sell nest-bull to lead without showing how to use workers in separate process :(

@fwoelffel fwoelffel reopened this Jul 28, 2019
@fwoelffel
Copy link
Contributor Author

Ok. I've had some time to think about this and I've come to the conclusion that the processors option should not be deprecated.

However, this options' type will change from

export type BullQueueProcessor =
  BullQueueProcessorCallback // (job: Job, done: DoneCallback) => void
  | BullQueueAdvancedProcessor // { concurrency?: number; name?: string; callback: BullQueueProcessorCallback; }
  | BullQueueSeparateProcessor // string
  | BullQueueAdvancedSeparateProcessor; // { concurrency?: number; name?: string; path: string; }

to

export type BullQueueProcessor =
  BullQueueSeparateProcessor // string
  | BullQueueAdvancedSeparateProcessor; // { concurrency?: number; name?: string; path: string; }

@igor-sky there's already an example in the README. Doesn't this work for you?

@fwoelffel
Copy link
Contributor Author

Closed by 1dd0303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants