Skip to content
Snippets Groups Projects
Commit 78cb1e90 authored by Hal Simpson's avatar Hal Simpson
Browse files

Streamlined update_count usage

parent 41887c20
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,6 @@ class Controller(object): ...@@ -41,7 +41,6 @@ class Controller(object):
self._inputFactory = inputFactory self._inputFactory = inputFactory
self._algorithm = algorithm self._algorithm = algorithm
self._outputFactory = outputFactory self._outputFactory = outputFactory
self._update_count = 0
def _get_input_timeseries(self, observatory, channels, starttime, endtime): def _get_input_timeseries(self, observatory, channels, starttime, endtime):
"""Get timeseries from the input factory for requested options. """Get timeseries from the input factory for requested options.
...@@ -197,9 +196,7 @@ class Controller(object): ...@@ -197,9 +196,7 @@ class Controller(object):
""" """
# If an update_limit is set, make certain we don't step past it. # If an update_limit is set, make certain we don't step past it.
if options.update_limit != 0: if options.update_limit != 0:
if update_count < options.update_limit: if update_count >= options.update_limit:
update_count += 1
else:
return return
algorithm = self._algorithm algorithm = self._algorithm
input_channels = options.inchannels or \ input_channels = options.inchannels or \
...@@ -235,7 +232,7 @@ class Controller(object): ...@@ -235,7 +232,7 @@ class Controller(object):
endtime = options.starttime - delta endtime = options.starttime - delta
options.starttime = starttime options.starttime = starttime
options.endtime = endtime options.endtime = endtime
self.run_as_update(options, update_count) self.run_as_update(options, update_count + 1)
# fill gap # fill gap
options.starttime = output_gap[0] options.starttime = output_gap[0]
options.endtime = output_gap[1] options.endtime = output_gap[1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment