Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
42c0ccb2
Commit
42c0ccb2
authored
Jan 03, 2013
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 822547: Make jobqueue.pl clear the request cache before sending each mail
r=dkl,a=LpSolit
parent
3e911b8f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
Bugzilla.pm
Bugzilla.pm
+13
-1
JobQueue.pm
Bugzilla/JobQueue.pm
+7
-0
No files found.
Bugzilla.pm
View file @
42c0ccb2
...
...
@@ -641,6 +641,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.
...
...
@@ -662,7 +674,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.
...
...
Bugzilla/JobQueue.pm
View file @
42c0ccb2
...
...
@@ -92,6 +92,13 @@ sub insert {
return
$retval
;
}
# Clear the request cache at the start of each run.
sub
work_once
{
my
$self
=
shift
;
Bugzilla
->
clear_request_cache
();
return
$self
->
SUPER::
work_once
(
@_
);
}
1
;
__END__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment