misc
This commit is contained in:
parent
e73113754f
commit
20d7d620b7
|
|
@ -44,14 +44,14 @@ def proc_trigger(trigger_step, update_f, step):
|
|||
|
||||
|
||||
step_t_delta = timedelta(days=0, minutes=0, seconds=30)
|
||||
def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
||||
def time_step(dt_str, dt_format='%Y-%m-%d %H:%M:%S', _timedelta = step_t_delta):
|
||||
dt = datetime.strptime(dt_str, dt_format)
|
||||
t = dt + _timedelta
|
||||
return t.strftime(dt_format)
|
||||
|
||||
|
||||
ep_t_delta = timedelta(days=0, minutes=0, seconds=1)
|
||||
def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = t_delta):
|
||||
def ep_time_step(s, dt_str, fromat_str='%Y-%m-%d %H:%M:%S', _timedelta = ep_t_delta):
|
||||
if s['mech_step'] == 0:
|
||||
return time_step(dt_str, fromat_str, _timedelta)
|
||||
else:
|
||||
|
|
@ -118,5 +118,3 @@ def exo_update_per_ts(ep):
|
|||
return y, s[y]
|
||||
|
||||
return {es: ep_decorator(f, es) for es, f in ep.items()}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue