-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows running multiple instances of the same Job in parallel while keeping the individual instances separated. I need this in Limes where we run one scrape job per service type. I cannot just use a ProducerConsumerJob because the overall scrape job is not ConcurrencySafe. Only the individual job instances are safe to run concurrently to each other because they are all confined to their own service type and thus cannot interfere with each other. This interface is my second attempt at covering this usecase, and is much less invasive than the first attempt. The major change is that pretty much everything needs to have a jobConfig now, which also means that the public API needs to change to be able to pass the WithLabel option into ProcessOne. Thankfully, that's a backwards-compatible change because only a variadic argument is added.
- Loading branch information
Showing
5 changed files
with
96 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters