[sysadmin-bin] Don't overload ldap.gnome.org too much, make use of our slave for the gnomecvs and ftpbasic groups



commit 3f12d7db36ce76643294c2b3f06475ecdfb2b04f
Author: Andrea Veri <av gnome org>
Date:   Tue Nov 5 08:34:30 2013 +0100

    Don't overload ldap.gnome.org too much, make use of our slave for the gnomecvs and ftpbasic groups

 create-auth |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/create-auth b/create-auth
index 8769bc5..f1ce2f2 100755
--- a/create-auth
+++ b/create-auth
@@ -9,6 +9,7 @@ import subprocess
 import shutil
 import time
 import random
+import socket
 try:
     import hashlib as md5
 except:
@@ -28,6 +29,13 @@ def get_md5sum_hash():
             user_md5sums [file] = m.hexdigest ()
     return user_md5sums
 
+## Don't overload ldap.gnome.org too much, make use of our slave
+## for the gnomecvs and ftpbasic groups.
+if socket.gethostname == 'git.gnome.org' or 'master.gnome.org':
+    ldap_server = 'view.gnome.org'
+else:
+    ldap_server = 'ldap.gnome.org'
+
 ## first you must open a connection to the server
 try:
     l = ldap.open("ldap.gnome.org")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]