Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.7

Request #15049 Count emails in queue
Submitted: 2008-11-16 13:03 UTC
From: mick Assigned: till
Status: Closed Package: Mail_Queue (version 1.2.2)
PHP Version: 5.1.6 OS: Apache
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 30 + 40 = ?

 
 [2008-11-16 13:03 UTC] mick (Michael Heuberger)
Description: ------------ Hello I would love to have a function for counting the emails in the queue. Why? I want to set the set_time_limit accordingly to the number of emails to be sent to avoid any interrupts. Like this: $count = oQueue->getCount(); $limit = $count * 2; // 2 sec for every email set_time_limit($limit); Thank you! Cheers Michael

Comments

 [2009-06-30 02:36 UTC] till (Till Klampaeckel)
-Status: Open +Status: Closed -Assigned To: +Assigned To: till
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I implemented a function getQueueCount(). It's only available in MDB2.
 [2009-06-30 07:51 UTC] mick (Michael Heuberger)
Thank you! But please implement this for other drivers too, not MDB2 only. Cheers Michael
 [2009-06-30 14:11 UTC] till (Till Klampaeckel)
MDB = deprecated DB = deprecated creole = Not sure how long we'd keep it. Which one are you using, and why? ;-)
 [2009-06-30 14:49 UTC] mick (Michael Heuberger)
DB and I didn't know that it's deprecated. It's easy to switch to MDB2? M.
 [2009-06-30 15:20 UTC] till (Till Klampaeckel)
Yes, it is. If you really, really want, I'll put the function into db as well. I'd rather phase out support for it more sooner than later. ;)
 [2009-06-30 16:17 UTC] mick (Michael Heuberger)
or i have to change my code and to switch to MDB2 :) whatever i already have subclassed your mail_queue class and implemented a workaround some months ago. so if the work this function for the db driver takes more than 15 minutes, forget it and let it be. thanks man! m.
 [2009-06-30 16:39 UTC] till (Till Klampaeckel)
Ok. Added getQueueCount() for db container in CVS. Please check out the release. To test: cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pear/Mail_Queue cd pear/Mail_Queue pear install -f package.xml
 [2009-06-30 17:34 UTC] mick (Michael Heuberger)
awesome, thanks dude! m.