Skip to content

Release 1.2

Compare
Choose a tag to compare
@deankarn deankarn released this 11 Dec 20:42
· 5 commits to v1 since this release

Added Consumer Hook

  • now can register ConsumerHook function that will be run while firing up the consumer routines and that return value will be set/passed to each job. This is particularity useful when creating a saving pool so a the consumer hook would create a database connection for each job to reuse instead of creating an additional one for each job.

Example

https://github.com/go-playground/pool/blob/v1/pool_test.go#L55