Legere amelioration de la gestion des locks

darcs-hash:20050331192814-d1718-25ad6254d2a1323ffd6399765b23a2669c804323.gz
This commit is contained in:
bernat 2005-03-31 21:28:14 +02:00
parent 5846b011d4
commit a3b1f8a2c3

View file

@ -189,6 +189,12 @@ class bornes_wifi(gen_config) :
def __init__(self,bornes=[]) :
self.db = crans_ldap()
self.bornes = bornes
# Pour eviter le probleme de lock...
os.system("kill $(cat /var/run/wifi-update.pid)")
time.sleep(1)
def __del__(self):
os.system("cd / ; systrace -d /etc/systrace/wifi-update -A /usr/local/bin/twistd --syslog -o -y /usr/scripts/gestion/wifi-update.py --pidfile=/var/run/wifi-update.pid")
def _gen(self) :
bornes = self.db.search('host=*.wifi.crans.org&puissance=*')['machine']