LJSUP-17669: Login.bml form refactoring
[livejournal.git] / cgi-bin / LJ / PersistentQueue.pm
blob548858df0ea66bd192824ce7aa603823cc4017a5
1 package LJ::PersistentQueue;
3 use strict;
4 use warnings;
6 use LJ::Data::Queue::Persistent;
8 sub new {
9 my ($class, %opts) = @_;
11 my $dbh = delete $opts{dbh} || LJ::get_db_writer();
13 return LJ::Data::Queue::Persistent->new(
14 table => 'persistent_queue',
15 cache => 0,
16 dbh => $dbh,
17 %opts,
23 package LJ;
25 sub queue {
26 my ($id, $size) = @_;
28 return LJ::PersistentQueue->new(id => $id, max_size => $size);