Bug 32558: (QA follow-up) Leave default to 1, remove extra fork
The default of 1 resembles the old behavior: 1 fork for the job. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commit3bf4addb24) Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com> (cherry picked from commit13023b2fe8) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
7c76176b85
commit
7a1f1f4961
|
|
@ -157,23 +157,13 @@ while (1) {
|
|||
}
|
||||
}
|
||||
$conn->disconnect;
|
||||
$pm->wait_all_children;
|
||||
|
||||
sub process_job {
|
||||
my ( $job, $args ) = @_;
|
||||
|
||||
my $pid;
|
||||
if ( $pid = fork ) {
|
||||
wait;
|
||||
return;
|
||||
}
|
||||
|
||||
die "fork failed!" unless defined $pid;
|
||||
|
||||
try {
|
||||
$job->process( $args );
|
||||
} catch {
|
||||
$job->status('failed')->store;
|
||||
};
|
||||
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue