comparison web/log.py @ 258:03e540c3ec24

fix server side long polling
author Matt Johnston <matt@ucc.asn.au>
date Tue, 09 Jun 2015 23:29:11 +0800
parents 0a1b642e3086
children 6c14e0573f50
comparison
equal deleted inserted replaced
257:d0c29436bb63 258:03e540c3ec24
245 val_rem = int(entries['%s_rem' % name]) 245 val_rem = int(entries['%s_rem' % name])
246 tick_wake = int(entries['tick_wake']) + 1 246 tick_wake = int(entries['tick_wake']) + 1
247 tick_secs = int(entries['tick_secs']) 247 tick_secs = int(entries['tick_secs'])
248 return val_ticks + float(val_rem) * tick_secs / tick_wake 248 return val_ticks + float(val_rem) * tick_secs / tick_wake
249 249
250 def write_current_params(current_params): 250 def write_current_params(current_params, current_epoch):
251 fridge_settings.update(current_params) 251 fridge_settings.update(current_params, current_epoch)
252 252
253 def read_current_params(): 253 def read_current_params():
254 params, epochtag = fridge_settings.get() 254 params, epochtag = fridge_settings.get()
255 return params 255 return params
256 256