s3tail/s3tail.py
def watch(self):
        '''Begin watching and reporting lines read from S3.

        This call will not return until all the files are read and processed or until a callback
        indicates the need to terminate processing early.

        Before reading each file, the optional `key_handler` provided when created will be invoked
        with the name of the S3 key. If the `key_handler` returns a "falsey" value the key will be
        skipped and the tail will move on to the next key.

        For every line parsed from the files found in S3, the `line_handler` provided when created
        will be invoked passing along the line number and line to the callback. If the
        `line_handler` returns a result (i.e. if it is not ``None``), processessing is terminated
        and the result will be returned from the call to `watch`.
        '''
        self._stopped = False
        for key in self._bucket.list(prefix=self._prefix, marker=self._bookmark_key):
            if self._stopped:
                break
            self._bookmark_key = None
            cache_pn, cached = self._cache.lookup(key.name)
            result = self._key_handler(key.name, cache_pn, cached)
            if not result:
                continue
            result = self._read(key)
            if result is not None:
                return result
            self._marker = key.name # marker always has to be _previous_ entry, not current
            self._line_num = 0
Begin watching and reporting lines read from S3.

        This call will not return until all the files are read and processed or until a callback
        indicates the need to terminate processing early.

        Before reading each file, the optional `key_handler` provided when created will be invoked
        with the name of the S3 key. If the `key_handler` returns a "falsey" value the key will be
        skipped and the tail will move on to the next key.

        For every line parsed from the files found in S3, the `line_handler` provided when created
        will be invoked passing along the line number and line to the callback. If the
        `line_handler` returns a result (i.e. if it is not ``None``), processessing is terminated
        and the result will be returned from the call to `watch`.
        
Begin watching and reporting lines read from S3.
This call will not return until all the files are read and processed or until a callback
indicates the need to terminate processing early.

Before reading each file, the optional `key_handler` provided when created will be invoked
with the name of the S3 key. If the `key_handler` returns a "falsey" value the key will be
skipped and the tail will move on to the next key.

For every line parsed from the files found in S3, the `line_handler` provided when created
will be invoked passing along the line number and line to the callback. If the
`line_handler` returns a result , processessing is terminated
and the result will be returned from the call to `watch`.
Begin watching and reporting lines read from S3 . This call will not return until all the files are read and processed or until a callback indicates the need to terminate processing early . Before reading each file the optional ` key_handler ` provided when created will be invoked with the name of the S3 key . If the ` key_handler ` returns a " falsey " value the key will be skipped and the tail will move on to the next key . For every line parsed from the files found in S3 the ` line_handler ` provided when created will be invoked passing along the line number and line to the callback . If the ` line_handler ` returns a result processessing is terminated and the result will be returned from the call to ` watch ` .
def watch(self):
        self._stopped = False
        for key in self._bucket.list(prefix=self._prefix, marker=self._bookmark_key):
            if self._stopped:
                break
            self._bookmark_key = None
            cache_pn, cached = self._cache.lookup(key.name)
            result = self._key_handler(key.name, cache_pn, cached)
            if not result:
                continue
            result = self._read(key)
            if result is not None:
                return result
            self._marker = key.name 
            self._line_num = 0
def watch ( self ) : self . _stopped = False for key in self . _bucket . list ( prefix = self . _prefix , marker = self . _bookmark_key ) : if self . _stopped : break self . _bookmark_key = None cache_pn , cached = self . _cache . lookup ( key . name ) result = self . _key_handler ( key . name , cache_pn , cached ) if not result : continue result = self . _read ( key ) if result is not None : return result self . _marker = key . name self . _line_num = 0
Begin watching and reporting lines read from S3.
Begin watching and reporting lines read from S3 .
'''Begin watching and reporting lines read from S3.

        This call will not return until all the files are read and processed or until a callback
        indicates the need to terminate processing early.

        Before reading each file, the optional `key_handler` provided when created will be invoked
        with the name of the S3 key. If the `key_handler` returns a "falsey" value the key will be
        skipped and the tail will move on to the next key.

        For every line parsed from the files found in S3, the `line_handler` provided when created
        will be invoked passing along the line number and line to the callback. If the
        `line_handler` returns a result (i.e. if it is not ``None``), processessing is terminated
        and the result will be returned from the call to `watch`.
        ''' # marker always has to be _previous_ entry, not current
self