Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LCOGT/neoexchange
Browse files Browse the repository at this point in the history
  • Loading branch information
talister committed Feb 28, 2019
2 parents 41be03e + d7408f7 commit 636e497
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
15 changes: 9 additions & 6 deletions neoexchange/core/management/commands/fetch_arecibo_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("==== Fetching Arecibo targets %s ====" % (datetime.now().strftime('%Y-%m-%d %H:%M')))
radar_targets = fetch_arecibo_targets()
for obj_id in radar_targets:
self.stdout.write("Reading Arecibo target %s" % obj_id)
update_MPC_orbit(obj_id, origin='A')
# Wait between 10 and 20 seconds
delay = random_delay(10, 20)
self.stdout.write("Slept for %d seconds" % delay)
if radar_targets is not None:
for obj_id in radar_targets:
self.stdout.write("Reading Arecibo target %s" % obj_id)
update_MPC_orbit(obj_id, origin='A')
# Wait between 10 and 20 seconds
delay = random_delay(10, 20)
self.stdout.write("Slept for %d seconds" % delay)
else:
self.stdout.write("Found no Arecibo targets to update")
15 changes: 9 additions & 6 deletions neoexchange/core/management/commands/fetch_goldstone_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ class Command(BaseCommand):
def handle(self, *args, **options):
self.stdout.write("==== Fetching Goldstone targets %s ====" % (datetime.now().strftime('%Y-%m-%d %H:%M')))
radar_targets = fetch_goldstone_targets()
for obj_id in radar_targets:
self.stdout.write("Reading Goldstone target %s" % obj_id)
update_MPC_orbit(obj_id, origin='G')
# Wait between 10 and 20 seconds
delay = random_delay(10, 20)
self.stdout.write("Slept for %d seconds" % delay)
if radar_targets is not None:
for obj_id in radar_targets:
self.stdout.write("Reading Goldstone target %s" % obj_id)
update_MPC_orbit(obj_id, origin='G')
# Wait between 10 and 20 seconds
delay = random_delay(10, 20)
self.stdout.write("Slept for %d seconds" % delay)
else:
self.stdout.write("Found no Goldstone targets to update")

0 comments on commit 636e497

Please sign in to comment.