connectordb/logger.py
def insert(self, streamname, value):
        """Insert the datapoint into the logger for the given stream name. The logger caches the datapoint
        and eventually synchronizes it with ConnectorDB"""
        if streamname not in self.streams:
            raise Exception("The stream '%s' was not found" % (streamname, ))

        # Validate the schema
        validate(value, self.streams[streamname])

        # Insert the datapoint - it fits the schema
        value = json.dumps(value)
        logging.debug("Logger: %s <= %s" % (streamname, value))
        c = self.database.cursor()
        c.execute("INSERT INTO cache VALUES (?,?,?);",
                  (streamname, time.time(), value))
def insert(self, streamname, value):
        if streamname not in self.streams:
            raise Exception("The stream '%s' was not found" % (streamname, ))

        # Validate the schema
        validate(value, self.streams[streamname])

        # Insert the datapoint - it fits the schema
        value = json.dumps(value)
        logging.debug("Logger: %s <= %s" % (streamname, value))
        c = self.database.cursor()
        c.execute("INSERT INTO cache VALUES (?,?,?);",
                  (streamname, time.time(), value))
def insert ( self , streamname , value ) : if streamname not in self . streams : raise Exception ( "The stream '%s' was not found" % ( streamname , ) ) # Validate the schema validate ( value , self . streams [ streamname ] ) # Insert the datapoint - it fits the schema value = json . dumps ( value ) logging . debug ( "Logger: %s <= %s" % ( streamname , value ) ) c = self . database . cursor ( ) c . execute ( "INSERT INTO cache VALUES (?,?,?);" , ( streamname , time . time ( ) , value ) )
Insert the datapoint into the logger for the given stream name. The logger caches the datapoint
        and eventually synchronizes it with ConnectorDB
Insert the datapoint into the logger for the given stream name . The logger caches the datapoint and eventually synchronizes it with ConnectorDB