Skip to content

Commit

Permalink
WIP fix non-load commands
Browse files Browse the repository at this point in the history
  • Loading branch information
taldcroft committed Dec 1, 2019
1 parent e5d630b commit a3227de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kadi/update_cmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ def get_cmds(start, stop, mp_dir='/data/mpcrit1/mplogs'):
# Get non-load commands (from autonomous or ground SCS107, NSM, etc) in the
# time range that the timelines span.
tl_datestart = min(timeline_loads['datestart'])
tl_datestop = max(timeline_loads['datestop'])
nl_cmds = db.fetchall('SELECT * from cmds where timeline_id IS NULL and '
'date >= "{}" and date <= "{}"'
.format(tl_datestart, tl_datestop))
.format(tl_datestart, stop.date))

# Private method from cmd_states.py fetches the actual int/float param values
# and returns list of dict.
nl_cmds = _tl_to_bs_cmds(nl_cmds, None, db)
nl_cmds = fix_nonload_cmds(nl_cmds)
logger.info(f'Found {len(nl_cmds)} non-load commands between {tl_datestart} : {stop.date}')

logger.info('Found {} timelines included within {} to {}'
.format(len(timeline_loads), start.date, stop.date))
Expand Down

0 comments on commit a3227de

Please sign in to comment.