From 45585d5c36bf0a1b0468d18bfbc9097b0f41a501 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Thu, 21 Dec 2006 22:47:42 +0000 Subject: [PATCH] Clear panne_level if the address hasn't failed for 1 year. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1308 839d8a87-29fc-0310-9880-83ba4fa771e5 --- bin/emails.broken.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/emails.broken.php b/bin/emails.broken.php index d1a31f7..6c7c5f8 100755 --- a/bin/emails.broken.php +++ b/bin/emails.broken.php @@ -96,6 +96,10 @@ XDB::execute("UPDATE emails SET panne_level = panne_level - 1 WHERE flags = 'active' AND panne_level > 1 AND last != CURDATE()"); +XDB::execute("UPDATE emails + SET panne_level = 0 + WHERE flags = 'active' AND panne_level = 1 + AND DATE_ADD(last, INTERVAL 1 YEAR) < CURDATE()"); $csv = "nom;prenom;promo;alias;bounce;nbmails\n"; foreach ($list as $alias=>$mails) { -- 2.1.4