Closed hassansin closed 6 years ago
Or if it's important to use random numbers as wid (IDK much about underlying arch), we could use https://golang.org/pkg/crypto/rand/#Read since it has the same behaviour of Ruby's securerandom.hex()
method used in the Ruby worker library.
Hello again, When running multiple workers in different docker containers, they all end up having the same worker id. And it confuses the faktory server thinking there is only one worker.
https://github.com/contribsys/faktory_worker_go/blob/master/runner.go#L106
rand.Int63()
by default always uses the same seed value of1
. So it returns the same deterministic values when invoked repeatedly. I think it should use an unique id generator instead of a random number for worker id.