Skip to content

Commit

Permalink
Implements Matthews PR comments
Browse files Browse the repository at this point in the history
Switches `return` to `continue` and fixes docs.
  • Loading branch information
jlashner committed Nov 9, 2020
1 parent 43628bc commit e90d39a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion agents/influxdb_publisher/influxdb_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def process_incoming_data(self):
while not self.incoming_data.empty():
data, feed = self.incoming_data.get()
if feed['agg_params'].get('exclude_influx', False):
return
continue

LOG.debug("Pulling data from queue.")

Expand Down
11 changes: 9 additions & 2 deletions docs/developer/feeds.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,20 @@ The following options can be specified here:
.. list-table:: Aggregator params
:widths: 20 20

* - frame_length
* - frame_length (float)
- Aggregation time (seconds) before frame is written to disk

* - fresh_time
* - fresh_time (float)
- Time (seconds) before feed is considered "stale", and is removed from
the HK status frame

* - exclude_aggregator (bool)
- If True, the HK Aggregator will not record this feed to G3.

* - exclude_influx (bool)
- If True, the InfluxPublisher will not publish feed to the influx
database.


Publishing to a Feed
--------------------
Expand Down
2 changes: 1 addition & 1 deletion ocs/agent/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ def process_incoming_data(self):
data, feed = self.incoming_data.get()

if feed['agg_params'].get('exclude_aggregator', False):
return
continue

address = feed['address']
sessid = feed['session_id']
Expand Down
17 changes: 3 additions & 14 deletions ocs/ocs_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,20 +413,9 @@ def register_feed(self, feed_name, **kwargs):
Determines if feed should be aggregated. At the moment, each agent
can have at most one aggregated feed. Defaults to False
agg_params (dict, optional):
Parameters used by the aggregator.
Params:
**frame_length** (float):
Deterimes the amount of time each G3Frame should be (in seconds).
**fresh_time** (float):
Time (seconds) before feed is considered "stale" and
removed from the HK status frame
**exclude_aggregator** (bool):
If True, the HK Aggregator will not record feed to g3.
**exclude_influx** (bool):
If True, the InfluxPublisher will not write the feed to
Influx.
Parameters used by the aggregator and influx publisher. See
the ``ocs.ocs_feed.Feed`` docstring for the full list of
aggregator params.
buffer_time (int, optional):
Specifies time that messages should be buffered in seconds.
If 0, message will be published immediately.
Expand Down

0 comments on commit e90d39a

Please sign in to comment.