summaryrefslogtreecommitdiffstats
path: root/Bugzilla/JobQueue.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2016-10-13 02:41:36 +0200
committerGitHub <noreply@github.com>2016-10-13 02:41:36 +0200
commitdf4677439d7b3658e2d896ffaab903b01c2e2fe6 (patch)
treed9013dcffb7c60cd83c23865d1a086d632f17d84 /Bugzilla/JobQueue.pm
parent31651c978e921e9e46cddd455f103fcf4b1a332a (diff)
downloadbugzilla-df4677439d7b3658e2d896ffaab903b01c2e2fe6.tar.gz
bugzilla-df4677439d7b3658e2d896ffaab903b01c2e2fe6.tar.xz
Bug 1301887 - File::Slurp triggers warnings on perl 5.24 and it is recommended to not use it (#21)
r=mtyson
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 0a5bcb116..66aba68d7 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";