Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
0 8 * * * mysql -D asterisk -e 'UPDATE `vicidial_lists` SET active = "Y" WHERE `list_id` IN ("testlistid1","testlistid2");'
0 20 * * * mysql -D asterisk -e 'UPDATE `vicidial_lists` SET active = "N" WHERE `list_id` IN ("testlistid1","testlistid2");'
williamconley wrote:4) Do note that deactivating a list through mysql will also require clearing leads from the hopper that are in that list (and not already queued). If you deactivate a list in the web interface, this is done for you, but if you're using mysql directly ... self-service time.
blackbird2306 wrote:williamconley wrote:4) Do note that deactivating a list through mysql will also require clearing leads from the hopper that are in that list (and not already queued). If you deactivate a list in the web interface, this is done for you, but if you're using mysql directly ... self-service time.
No you are not right. Deactivating a list from web interface won't clear anything. It is sufficient to deactivate the list directly by mysql and it makes no difference to web interface. The hopper script will clear the leads automatically at least after 1 minute regardless of how you deactivated them. The decisive point is only mysql active status!
0 20 * * * sleep 3; mysql -D asterisk -e 'DELETE from vicidial_hopper WHERE `campaign_id` IN ("campaignid1");'
0 20 * * * sleep 3; mysql -D asterisk -e 'DELETE from vicidial_hopper WHERE `list_id` IN ("testlistid1","testlistid2");'
blackbird2306 wrote:... force a reset of the hopper, ...
clearing leads from the hopper that are in that list (and not already queued).
blackbird2306 wrote:You always have to have the last word, and you always think you are right. This seems to be your character a know-it-all. And don't bump in my posts again, it would be a nice hobby to do this as well all the day with your posts.
For a better understanding: You mean deactivating a list from web interface is OK without clearing the hopper, but deactivating in mysql directly (which is same process what I had to teach you) needs a special query to clear the hopper? How about saying sorry I thought deactivating from web interface would clear the hopper, but I wasn't right? But instead you try to mop up me with things like tsk...
Well: What if this lead gets pulled during those 60 seconds? Doesn't that pretty much defeat the purpose of deactivating the list?
Bentfinger wrote:as an after thought, and I apologize for my ignorance as I am new to sql, I have mostly used the API to make changes, but can I adjust the code to clear the hopper of the leads from the deactivated lists 1 minute after deactivating the lists ie: 8:00 to deactivate and 8:01 to clear the hopper?
Users browsing this forum: No registered users and 80 guests