|
|
@@ -275,6 +275,10 @@ class Filter(object): |
|
|
|
Return value of 'function' is the number of data rows processed. |
|
|
|
Unprocessed data will be provided again in a subsequent call |
|
|
|
(unless 'final' is True). |
|
|
|
|
|
|
|
If unprocessed data remains after 'final' is True, the interval |
|
|
|
being inserted will be ended at the timestamp of the first |
|
|
|
unprocessed data point. |
|
|
|
""" |
|
|
|
if args is None: |
|
|
|
args = [] |
|
|
@@ -319,7 +323,13 @@ class Filter(object): |
|
|
|
|
|
|
|
# Last call for this contiguous interval |
|
|
|
if old_array.shape[0] != 0: |
|
|
|
function(old_array, interval, args, insert_function, True) |
|
|
|
processed = function(old_array, interval, args, |
|
|
|
insert_function, True) |
|
|
|
if processed != old_array.shape[0]: |
|
|
|
# Truncate the interval we're inserting at the first |
|
|
|
# unprocessed data point. This ensures that |
|
|
|
# we'll not miss any data when we run again later. |
|
|
|
insert_ctx.update_end(old_array[processed][0]) |
|
|
|
|
|
|
|
def main(argv = None): |
|
|
|
# This is just a dummy function; actual filters can use the other |
|
|
|