Skip to content

Commit

Permalink
Merge pull request #138 from sot/non-load
Browse files Browse the repository at this point in the history
Fix ingest of non-load commands during a load stoppage (anomaly)
  • Loading branch information
taldcroft authored Dec 2, 2019
2 parents e5d630b + a3227de commit 85187c3
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 85187c3

Please sign in to comment.