update and rename buildfarm branches
[build-farm.git] / mail-dead-hosts.py
index f4b13fdeb92b3077809577f5bd4a84082b0a58b2..b83ce4bd1183e67681f1fc033d3bb2939c4f891f 100755 (executable)
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-from buildfarm.sqldb import BuildFarm
+from buildfarm import BuildFarm
 from buildfarm.web import host_uri
 import optparse
 import smtplib
@@ -33,7 +33,7 @@ buildfarm = BuildFarm(timeout=40.0)
 smtp = smtplib.SMTP()
 smtp.connect()
 
-hosts = buildfarm.hostdb.dead_hosts(7 * 86400)
+hosts = buildfarm.hostdb.dead_hosts(21 * 86400)
 for host in hosts:
     if host.last_update:
         last_update = time.strftime("%a %b %e %H:%M:%S %Y", time.gmtime(host.last_update))
@@ -42,7 +42,7 @@ for host in hosts:
 
     body = """
 Your host %s has been part of the Samba Build farm, hosted
-at http://build.samba.org/.
+at https://build.samba.org/.
 
 Sadly however we have not heard from it since %s.
 
@@ -53,13 +53,13 @@ why we have not heard from your host?
 If you no longer wish your host to participate in the Samba Build
 Farm, then please let us know so we can remove its records.
 
-You can see the summary for your host at:
+You can see the summary for your host at: %s
 
 Thanks,
 
 The Build Farm administration team.
 
-""" % (host.name, last_update, host_uri("http://build.samba.org/build.cgi", host.name))
+""" % (host.name, last_update, host_uri("https://build.samba.org/build.cgi", host.name))
 
     msg = MIMEText(body)