aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/JobQueue.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@netscape.net>2018-02-18 18:25:30 +0100
committerFrédéric Buclin <LpSolit@netscape.net>2018-02-18 18:25:30 +0100
commitc52e3c6e8ad547ec035309994144fd22e2925267 (patch)
treed762218e6f71e302121d6112ad14deb5552201f8 /Bugzilla/JobQueue.pm
parentd966c278e6c653a90343c739ac5a48f4127cf7e0 (diff)
parent37784703eba80cb61d1734a11e09b62fa0eaeae9 (diff)
downloadbugs-c52e3c6e8ad547ec035309994144fd22e2925267.tar
bugs-c52e3c6e8ad547ec035309994144fd22e2925267.tar.gz
bugs-c52e3c6e8ad547ec035309994144fd22e2925267.tar.bz2
bugs-c52e3c6e8ad547ec035309994144fd22e2925267.tar.xz
bugs-c52e3c6e8ad547ec035309994144fd22e2925267.zip
Sync with upstream release 5.0.4
Diffstat (limited to 'Bugzilla/JobQueue.pm')
-rw-r--r--Bugzilla/JobQueue.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/JobQueue.pm b/Bugzilla/JobQueue.pm
index d5ceda8e9..6ff85d84f 100644
--- a/Bugzilla/JobQueue.pm
+++ b/Bugzilla/JobQueue.pm
@@ -14,8 +14,8 @@ use warnings;
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::Install::Util qw(install_string);
+use Bugzilla::Util qw(read_text);
use File::Basename;
-use File::Slurp;
use base qw(TheSchwartz);
use fields qw(_worker_pidfile);
@@ -124,7 +124,7 @@ sub subprocess_worker {
# And poll the PID to detect when the working has finished.
# We do this instead of system() to allow for the INT signal to
# interrup us and trigger kill_worker().
- my $pid = read_file($self->{_worker_pidfile}, err_mode => 'quiet');
+ my $pid = read_text($self->{_worker_pidfile}, err_mode => 'quiet');
if ($pid) {
sleep(3) while(kill(0, $pid));
}
@@ -139,7 +139,7 @@ sub subprocess_worker {
sub kill_worker {
my $self = Bugzilla->job_queue();
if ($self->{_worker_pidfile} && -e $self->{_worker_pidfile}) {
- my $worker_pid = read_file($self->{_worker_pidfile});
+ my $worker_pid = read_text($self->{_worker_pidfile});
if ($worker_pid && kill(0, $worker_pid)) {
$self->debug("Stopping worker process");
system "$0 -f -p '" . $self->{_worker_pidfile} . "' stop";