Пример #1
0
    def get(self, fact_name):
        resource_id = self.get_argument("id", None, True)
        
        fact, timeout = Fact.get(resource_id, fact_name)
        
        if fact is not None and not timeout:
            
            self.write(fact.value)

        if timeout:
            self._server._logger.info("Fact %s about %s has timed out, an update is requested" % (resource_id, fact_name))
        
        if fact is None or timeout:
            self._server.poll_facts(resource_id)
            self.set_status(404)