Home > Aria Crescendo Documentation > Data Feed Web Service > Example Data Feed Code > Data Streaming Example Store For Last Event Id

Data Streaming Example Store For Last Event Id

Table of contents
No headers
class StreamStatusStore(object):
    A dummy store for a stream's last event id.

    The purpose of this is to save the stream's last event id so that in the event that this app crashes,
    the app knows where to restart.  A real implementation should periodically write the value to some kind of
    persistent store, such as a file system, memcache or database.  On restart the implementation should reread
    the value.

    def __init__(self):
        self.saved_last_id = None

    def save_last_id(self, last_id):
        self.saved_last_id = last_id

    def get_last_id(self):
        return self.saved_last_id

Download .py file

Last modified


This page has no custom tags.


This page has no classifications.