From 2a78ea5ecc2c66df4ae79d858e60a0b2fc1f01ef Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Fri, 10 Nov 2023 15:52:49 +0100 Subject: [PATCH] Improve workers by calling srand() after starting a new job process --- Changes | 3 ++- lib/Minion/Job.pm | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 240b626b..3ae7bfb3 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ -10.26 2023-02-03 +10.26 2023-11-10 - Added type information to worker status. + - Improved workers by calling srand() after starting a new job process. 10.25 2022-06-24 - Added workers field to stats methods in Minion and Minion::Backend::Pg. diff --git a/lib/Minion/Job.pm b/lib/Minion/Job.pm index 63c9b5a7..caae5396 100644 --- a/lib/Minion/Job.pm +++ b/lib/Minion/Job.pm @@ -81,6 +81,7 @@ sub start { Mojo::IOLoop->reset; local $SIG{CHLD} = local $SIG{INT} = local $SIG{TERM} = local $SIG{QUIT} = 'DEFAULT'; local $SIG{USR1} = local $SIG{USR2} = 'IGNORE'; + srand; # Child if (defined(my $err = $self->execute)) { $self->fail($err) }