diff options
author | mkanat%bugzilla.org <> | 2008-12-24 04:43:36 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2008-12-24 04:43:36 +0100 |
commit | 8a3d4469cc85108a194a78ac95f2a6780d2971eb (patch) | |
tree | c89a2d8abb28b792bcdcf04ea76291842dd91d59 /Bugzilla.pm | |
parent | 570ca770d29d7800f79d6789c2b1142e383a348a (diff) | |
download | bugzilla-8a3d4469cc85108a194a78ac95f2a6780d2971eb.tar.gz bugzilla-8a3d4469cc85108a194a78ac95f2a6780d2971eb.tar.xz |
Bug 284184: Allow Bugzilla to use an asynchronous job queue for sending mail.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> and Mark Smith <mark@plogs.net> r=glob, a=mkanat
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index 00740682c..12ae42bba 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -42,6 +42,7 @@ use Bugzilla::Auth::Persist::Cookie; use Bugzilla::CGI; use Bugzilla::DB; use Bugzilla::Install::Localconfig qw(read_localconfig); +use Bugzilla::JobQueue; use Bugzilla::Template; use Bugzilla::User; use Bugzilla::Error; @@ -315,6 +316,12 @@ sub logout_request { # there. Don't rely on it: use Bugzilla->user->login instead! } +sub job_queue { + my $class = shift; + $class->request_cache->{job_queue} ||= Bugzilla::JobQueue->new(); + return $class->request_cache->{job_queue}; +} + sub dbh { my $class = shift; # If we're not connected, then we must want the main db @@ -714,4 +721,10 @@ Returns the local timezone of the Bugzilla installation, as a DateTime::TimeZone object. This detection is very time consuming, so we cache this information for future references. +=item C<job_queue> + +Returns a L<Bugzilla::JobQueue> that you can use for queueing jobs. +Will throw an error if job queueing is not correctly configured on +this Bugzilla installation. + =back |