diff options
author | Byron Jones <bjones@mozilla.com> | 2011-11-15 09:15:04 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2011-11-15 09:15:04 +0100 |
commit | 2afa374c8b0281352374a90fd06d07ea3a9bf987 (patch) | |
tree | 91a1eaa57976e4262c667d1ad0c21becc3718e6c | |
parent | 1ba64afb7288f2d3ce14a2922f8f0893f73f119f (diff) | |
download | bugzilla-2afa374c8b0281352374a90fd06d07ea3a9bf987.tar.gz bugzilla-2afa374c8b0281352374a90fd06d07ea3a9bf987.tar.xz |
Bug 702208: TheSchwartz should not open a new db connection for each email (updated to match upstream patch)
-rw-r--r-- | Bugzilla/JobQueue.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/JobQueue.pm b/Bugzilla/JobQueue.pm index 8523fffa2..7ea678345 100644 --- a/Bugzilla/JobQueue.pm +++ b/Bugzilla/JobQueue.pm @@ -35,6 +35,11 @@ use constant JOB_MAP => { send_mail => 'Bugzilla::Job::Mailer', }; +# Without a driver cache TheSchwartz opens a new database connection +# for each email it sends. This cached connection doesn't persist +# across requests. +use constant DRIVER_CACHE_TIME => 300; # 5 minutes + sub job_map { if (!defined(Bugzilla->request_cache->{job_map})) { my $job_map = JOB_MAP; @@ -62,7 +67,7 @@ sub new { pass => $lc->{db_pass}, prefix => 'ts_', }], - driver_cache_expiration => 300, # 5 minutes + driver_cache_expiration => DRIVER_CACHE_TIME, ); return $self; |