From: Dylan William Hardison Date: Tue, 6 Mar 2018 00:32:08 +0000 (-0500) Subject: Bug 1441181 - Step 3 - Clear memory after each job, not before X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c418f3aeb9bbbea2f2ffead8cc6c1fee5a82fe5b;p=thirdparty%2Fbugzilla.git Bug 1441181 - Step 3 - Clear memory after each job, not before --- diff --git a/Bugzilla/JobQueue.pm b/Bugzilla/JobQueue.pm index 661c1c492..b3b54de79 100644 --- a/Bugzilla/JobQueue.pm +++ b/Bugzilla/JobQueue.pm @@ -147,10 +147,11 @@ sub set_pidfile { # Clear the request cache at the start of each run. sub work_once { my $self = shift; + my $val = $self->SUPER::work_once(@_); Bugzilla::Hook::process('request_cleanup'); Bugzilla::Bug->CLEANUP; Bugzilla->clear_request_cache(); - return $self->SUPER::work_once(@_); + return $val; } # Never process more than MAX_MESSAGES in one batch, to avoid memory