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 commit 3bf4addb24)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2023-02-17 07:25:08 +00:00 committed by Jacob O'Mara
parent 95a5d612f3
commit 13023b2fe8

View file

@ -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;
}