binarymatt / pyres

a resque clone in python
http://github.com/binarydud/pyres
MIT License
955 stars 130 forks source link

re-seed the Python random number generator after forking jobs #83

Closed pteichman-litl closed 13 years ago

pteichman-litl commented 13 years ago

At some point during pyres_worker startup, the Python PRNG is seeded. Since pyres_worker doesn't generate any random numbers on its own, each job process that is forked starts with the PRNG in the same state, and they share the same sequence of random numbers.

Fixes #82 https://github.com/binarydud/pyres/issues/82