Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to rereading the fields file #488

Merged
merged 9 commits into from
Apr 12, 2018
2 changes: 2 additions & 0 deletions pocs/scheduler/dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def get_observation(self, time=None, show_all=False, reread_fields_file=False):
defaults to time called
show_all (bool, optional): Return all valid observations along with
merit value, defaults to False to only get top value
reread_fields_file (bool, optional): If the fields file should be reread
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the reason for not making the change here in the params list (i.e. default =True).

before scheduling occurs, defaults to False.

Returns:
tuple or list: A tuple (or list of tuples) with name and score of ranked observations
Expand Down
2 changes: 1 addition & 1 deletion pocs/state/states/default/scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def on_enter(event_data):

# Get the next observation
try:
observation = pocs.observatory.get_observation()
observation = pocs.observatory.get_observation(reread_fields_file=True)
pocs.logger.info("Observation: {}".format(observation))
except error.NoObservation as e:
pocs.say("No valid observations found. Can't schedule. Going to park.")
Expand Down