diff --git a/Bugzilla/JobQueue.pm b/Bugzilla/JobQueue.pm index 5e99c4e2a..5122f18d5 100644 --- a/Bugzilla/JobQueue.pm +++ b/Bugzilla/JobQueue.pm @@ -27,6 +27,7 @@ use strict; use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Install::Util qw(install_string); +use Bugzilla::JobQueue::ObjectDriver; use base qw(TheSchwartz); sub new { @@ -41,10 +42,12 @@ sub new { # to write to it. my $self = $class->SUPER::new( databases => [{ - dsn => Bugzilla->dbh_main->{private_bz_dsn}, - user => $lc->{db_user}, - pass => $lc->{db_pass}, prefix => 'ts_', + driver => Bugzilla::JobQueue::ObjectDriver->new( + dsn => Bugzilla->dbh_main->{private_bz_dsn}, + username => $lc->{db_user}, + password => $lc->{db_pass}, + ), }], ); diff --git a/Bugzilla/JobQueue/ObjectDriver.pm b/Bugzilla/JobQueue/ObjectDriver.pm new file mode 100644 index 000000000..9ef272244 --- /dev/null +++ b/Bugzilla/JobQueue/ObjectDriver.pm @@ -0,0 +1,16 @@ +#!/usr/bin/perl + +package Bugzilla::JobQueue::ObjectDriver; + +use strict; +use Bugzilla; +use base qw(Data::ObjectDriver::Driver::DBI); + +sub init_db +{ + return Bugzilla->dbh_main; +} +*dbh = *init_db; + +1; +__END__