/[pdpsoft]/nl.nikhef.ndpf.groupviews/branches/RB-2.1.1/ndpf-gv-dbupdate
ViewVC logotype

Diff of /nl.nikhef.ndpf.groupviews/branches/RB-2.1.1/ndpf-gv-dbupdate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2553 by templon, Thu Mar 29 18:29:28 2012 UTC revision 2554 by templon, Tue Jun 26 07:50:24 2012 UTC
# Line 165  if len(rl) > 0: Line 165  if len(rl) > 0:
165      stl = list()      stl = list()
166      for r in rl:      for r in rl:
167          stl.append(r[0])          stl.append(r[0])
168            rollover = 60.0/len(stl)
     rollover = 60./len(stl)  
169  else:  else:
170      selstr = 'select comp_time from jobs where comp_time<>"None"'      selstr = 'select comp_time from jobs where comp_time<>"None"'
171      cu.execute(selstr)      cu.execute(selstr)
# Line 177  else: Line 176  else:
176              stl.append(r[0])              stl.append(r[0])
177          stl.sort()          stl.sort()
178          rollover = (now - stl[-2])/2.          rollover = (now - stl[-2])/2.
         rollover = 60./len(stl)  
179      elif len(rl) == 1:      elif len(rl) == 1:
180          rollover = now - rl[0][0]          rollover = now - rl[0][0]
181          print 'used time since last start'          print 'used time since last start'
# Line 185  else: Line 183  else:
183          rollover = 600 # if nothing seen, all we know is, not in last ten minutes (keep_completed)          rollover = 600 # if nothing seen, all we know is, not in last ten minutes (keep_completed)
184          print 'set to 600, no comp_times seen'          print 'set to 600, no comp_times seen'
185    
186    # print "len(stl), rollover:", len(stl), rollover
187  rrdtool.update(DATADIR + "rollover" + '.waittime.rrd',  rrdtool.update(DATADIR + "rollover" + '.waittime.rrd',
188                 'N:' + repr(int(rollover)))                 'N:' + repr(int(rollover)))
189    

Legend:
Removed from v.2553  
changed lines
  Added in v.2554

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28