goworker icon indicating copy to clipboard operation
goworker copied to clipboard

Export the workers list

Open gravis opened this issue 11 years ago • 5 comments

but don't expose workerFuncs

gravis avatar Jan 01 '14 20:01 gravis

I created this because I want to be able to test that my worker is registered.

gravis avatar Jan 01 '14 20:01 gravis

Thanks for the contribution. In what sort of use case are you testing that a worker is registered?

benmanns avatar Jan 01 '14 20:01 benmanns

Exactly as in https://github.com/gravis/goworker/blob/47c41eee3d1697086b36351383677e4f67ab55a7/workers_test.go I have tests for my workers, but if they're not registered, I will have runtime errors like:

1388601384386690670 [Critical] No worker for SomeJob in queue myQueue with args []

gravis avatar Jan 01 '14 20:01 gravis

Globally, I would like to add more exported (public) methods like that, for example to provide runtime info of my workers through various interfaces (telnet, http, etc.).

gravis avatar Jan 01 '14 20:01 gravis

Any news on this? (and the other issues, more generally) thanks

gravis avatar Feb 06 '14 07:02 gravis