summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-01-02 17:31:37 +0100
committerByron Jones <bjones@mozilla.com>2013-01-02 17:31:37 +0100
commitdfbc167a014c2630e07296777c9d75dd2f0f236d (patch)
tree691f38593f0e1d82c65fddb78e2c1a096652d0cd /Bugzilla.pm
parent31610212aa0731715c913f724001fcd6ab1e1df8 (diff)
downloadbugzilla-dfbc167a014c2630e07296777c9d75dd2f0f236d.tar.gz
bugzilla-dfbc167a014c2630e07296777c9d75dd2f0f236d.tar.xz
Bug 822547: Make jobqueue.pl clear the request cache before sending each mail
r=dkl,a=LpSolit
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 111d567e6..baaf78ff7 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -618,6 +618,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.
@@ -639,7 +651,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.