Skip to content

Instantly share code, notes, and snippets.

@jdunne-kaplan
Created December 2, 2014 16:40
Show Gist options
  • Save jdunne-kaplan/7d41e37de74bf41f1d4d to your computer and use it in GitHub Desktop.
Save jdunne-kaplan/7d41e37de74bf41f1d4d to your computer and use it in GitHub Desktop.
Production debug TLEs
import models
opaqueID = "55a3d0f9-760f-46c7-b0fb-a0162fa383f8"
start_tle = models.TimelineEvent.query(models.TimelineEvent.opaque_id == opaqueID, models.TimelineEvent.event_type == "eventStart").get()
#print start_tle
tles = models.TimelineEvent.query(models.TimelineEvent.opaque_id == opaqueID).order(models.TimelineEvent.sequence_number).fetch()
for tle in tles:
print "{: 10.3f}\t{:<16}\t{:>9}".format((tle.start - start_tle.start).total_seconds(), tle.event_type, len(tle.drawing_args.drawing) if hasattr(tle, "drawing_args") and tle.drawing_args.drawing is not None else "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment