diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-03-08 21:40:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 21:40:10 +0100 |
commit | 2056caa180f907c6e5727954547dfd928cf6a360 (patch) | |
tree | ca93c1ebd9364ebb99927223ce9101313ba69c9a /Bugzilla/JobQueue | |
parent | edf9851a7ddcab83c6dd54f2294041613ace24f7 (diff) | |
download | bugzilla-2056caa180f907c6e5727954547dfd928cf6a360.tar.gz bugzilla-2056caa180f907c6e5727954547dfd928cf6a360.tar.xz |
Revert "Bug 832893: change jobqueue.pl to spawn worker processes to deliver bugmail to avoid memory leaks"
This reverts commit 6df7b9816541893a905eec56c333b40673522e84.
Diffstat (limited to 'Bugzilla/JobQueue')
-rw-r--r-- | Bugzilla/JobQueue/Runner.pm | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/Bugzilla/JobQueue/Runner.pm b/Bugzilla/JobQueue/Runner.pm index 3adb91857..5b3164ef9 100644 --- a/Bugzilla/JobQueue/Runner.pm +++ b/Bugzilla/JobQueue/Runner.pm @@ -39,7 +39,6 @@ our $initscript = "bugzilla-queue"; sub gd_preconfig { my $self = shift; - $self->{_run_command} = 'subprocess_worker'; my $pidfile = $self->{gd_args}{pidfile}; if (!$pidfile) { $pidfile = bz_locations()->{datadir} . '/' . $self->{gd_progname} @@ -180,26 +179,21 @@ sub gd_setup_signals { $SIG{TERM} = sub { $self->gd_quit_event(); } } -sub gd_quit_event { - Bugzilla->job_queue->kill_worker(); - exit(1); -} - sub gd_other_cmd { - my ($self, $do, $locked) = @_; - if ($do eq "once") { - $self->{_run_command} = 'work_once'; - } elsif ($do eq "onepass") { - $self->{_run_command} = 'work_until_done'; - } else { - $self->SUPER::gd_other_cmd($do, $locked); + my ($self) = shift; + if ($ARGV[0] eq "once") { + $self->_do_work("work_once"); + + exit(0); } + + $self->SUPER::gd_other_cmd(); } sub gd_run { my $self = shift; - $SIG{__DIE__} = \&Carp::confess if $self->{debug}; - $self->_do_work($self->{_run_command}); + + $self->_do_work("work"); } sub _do_work { @@ -207,7 +201,6 @@ sub _do_work { my $jq = Bugzilla->job_queue(); $jq->set_verbose($self->{debug}); - $jq->set_pidfile($self->{gd_pidfile}); foreach my $module (values %{ Bugzilla::JobQueue->job_map() }) { eval "use $module"; $jq->can_do($module); |