Random idler fixes.
authorBernard Blackham <[email protected]>
Thu, 12 Aug 2004 09:44:57 +0000 (09:44 +0000)
committerBernard Blackham <[email protected]>
Thu, 12 Aug 2004 09:44:57 +0000 (09:44 +0000)
sql-edition/servers/Idler.py
sql-edition/servers/VendServer.py

index 555630f..5ffea0b 100755 (executable)
@@ -178,4 +178,4 @@ class GrayIdler(Idler):
                self.i = 0
                self.grayCode = 0
                if self.reorder:
-                       self.reorder = int(random()*40320)
+                       self.reorder = int(random()*40319)+1
index 992a65d..45288f1 100755 (executable)
@@ -278,11 +278,11 @@ def run_forever(rfh, wfh, options, cf):
                        time_to_autologout = time() + 15
 
                if time_to_idle == None and cur_user == '':
-                       time_to_idle = time() + 30
+                       time_to_idle = time() + 5
                        choose_idler()
-               if time_to_idle != None and cur_user != '': time_to_idle = None
+               if time_to_idle is not None and cur_user != '': time_to_idle = None
                if time_to_idle is not None and time() > time_to_idle: idle_step()
-               if time() > time_to_idle + 300:
+               if time_to_idle is not None and time() > time_to_idle + 300:
                        time_to_idle = time()
                        choose_idler()
 

UCC git Repository :: git.ucc.asn.au