summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-12-20 04:33:44 +0100
committerByron Jones <bjones@mozilla.com>2012-12-20 04:33:44 +0100
commit3154c482b5b1adb5c9229106d2130bc87439e627 (patch)
tree21dce2fe11b62f9caef2d8cd83ff171a1af5f033 /Bugzilla.pm
parent41221bbee3b170411f404080798e2f976b0e1c3e (diff)
downloadbugzilla-3154c482b5b1adb5c9229106d2130bc87439e627.tar.gz
bugzilla-3154c482b5b1adb5c9229106d2130bc87439e627.tar.xz
Bug 822547: jobqueue.pl should clear the request cache before sending each mail
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 70a3ade54..efef052be 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -627,6 +627,18 @@ sub request_cache {
return $_request_cache;
}
+sub clear_request_cache {
+ $_request_cache = {};
+ if ($ENV{MOD_PERL}) {
+ require Apache2::RequestUtil;
+ my $request = eval { Apache2::RequestUtil->request };
+ if ($request) {
+ my $pnotes = $request->pnotes;
+ delete @$pnotes{(keys %$pnotes)};
+ }
+ }
+}
+
# This is a per-process cache. Under mod_cgi it's identical to the
# request_cache. When using mod_perl, items in this cache live until the
# worker process is terminated.
@@ -648,7 +660,7 @@ sub _cleanup {
$dbh->bz_rollback_transaction() if $dbh->bz_in_transaction;
$dbh->disconnect;
}
- undef $_request_cache;
+ clear_request_cache();
# These are both set by CGI.pm but need to be undone so that
# Apache can actually shut down its children if it needs to.