Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Queue-DBI CPAN distribution.

Report information
The Basics
Id: 78985
Status: resolved
Priority: 0/
Queue: Queue-DBI

People
Owner: Nobody in particular
Requestors: bond-spb [...] mail.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.0.1



Subject: create_queue && delete_queue && is_queue_exists functions
Date: Wed, 15 Aug 2012 20:54:41 +0400
To: <bug-queue-dbi [...] rt.cpan.org>
From: Сергей Бондаренко <bond-spb [...] mail.ru>
For module completeness I suggest create_queue(), delete_queue() and is_queue_exists() functions, so: * no need to manually insert/delete queue into DB * I can write something like: Queue::DBI::create_queue('my_que') unless Queue::DBI::is_queue_exists('my_que'); * I can additionaly create/delete temporary queues Regads Sergey
Hi Sergey, Show quoted text
> For module completeness I suggest create_queue(), delete_queue() and > is_queue_exists() functions, > so: > * no need to manually insert/delete queue into DB > * I can write something like: Queue::DBI::create_queue('my_que') > unless Queue::DBI::is_queue_exists('my_que'); > * I can additionaly create/delete temporary queues
Being able to manage queues is a great extension for this module, however since you need $dbh for each operation I'm concerned that the API would have to be, for example: Queue::DBI::create_queue( 'my_queue', dbh => $dbh, ); Passing $dbh around each time doesn't seem as easy as it could be. What would you think of the following tweak to it: use Queue::DBI::Admin; my $queues_admin = Queue::DBI::Admin->new( dbh => $dbh, ); $queues_admin->create_tables(); # Formerly Queue::DBI::create_tables() $queues_admin->create_queue( $queue_name ) if !$queues_admin->has_queue( $queue_name ); $queues_admin->delete_queue( $queue_name ); Please let me know what you think, and thank you again for your suggestions! Guillaume
Subject: Re: [rt.cpan.org #78985] create_queue && delete_queue && is_queue_exists functions
Date: Thu, 16 Aug 2012 21:32:45 +0400
To: <bug-Queue-DBI [...] rt.cpan.org>
From: Сергей Бондаренко <bond-spb [...] mail.ru>
Hi Guillaume, Show quoted text
> use Queue::DBI::Admin;
Yes, this right decision. Like Oracle's Advance Queueing: * DBMS_AQ - user programming interface (enqueue/dequeue) * DBMS_AQADM - administrator interface (create/drop queue, queue table, ...) Sergey
Hi Sergey, Sorry it took me a little longer than I expected, but I released yesterday Queue::DBI v2.0.1, which includes Queue::DBI::Admin. Please take a look at it when you have the time, it matches closely the API we had talked about but feel free to send me suggestions or comments! Thank you again for your help on this module, Guillaume
Subject: Re: [rt.cpan.org #78985] create_queue && delete_queue && is_queue_exists functions
Date: Sat, 1 Sep 2012 10:14:00 +0400
To: <bug-Queue-DBI [...] rt.cpan.org>
From: Сергей Бондаренко <bond-spb [...] mail.ru>
Hi Guillaume, Thank you for your work. I'll be back in two weeks and will test your module as soon as possible. Sergey Show quoted text
----- Original Message ----- From: "Guillaume B. Aubert via RT" <bug-Queue-DBI@rt.cpan.org> To: <bond-spb@mail.ru> Sent: Saturday, September 01, 2012 1:54 AM Subject: [rt.cpan.org #78985] create_queue && delete_queue && is_queue_exists functions
> <URL: https://rt.cpan.org/Ticket/Display.html?id=78985 > > > Hi Sergey, > > Sorry it took me a little longer than I expected, but I released > yesterday Queue::DBI v2.0.1, which includes Queue::DBI::Admin. > > Please take a look at it when you have the time, it matches closely the > API we had talked about but feel free to send me suggestions or comments! > > Thank you again for your help on this module, > > Guillaume >
Show quoted text
> I'll be back in two weeks and will test your module as soon as possible.
No worries, take your time! Thank you Sergey. Guillaume