Skip to content

Commit 5b54adb

Browse files
jamsterdefunkt
authored andcommitted
Adding a rand to the parent process so that forked workers can be reseeded
1 parent 32915b0 commit 5b54adb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def work(interval = 5, &block)
114114
log "got: #{job.inspect}"
115115

116116
if @child = fork
117+
rand # Reseeding
117118
procline = "resque: Forked #{@child} at #{Time.now.to_i}"
118119
$0 = procline
119120
log! procline

0 commit comments

Comments
 (0)