예제 #1
0
    def _process_completion(self, data):
        """

        :param data:
            data["obj"]
            data["method"]
            data["args"]
            data["id"]
        :return:
        """
        if data["obj"] == "library":

            if data["method"] == "refresh_index_record_in_cache":
                title = data["args"][-1]  # Sometimes this is first arg, sometimes second.  Always last.
                logger.info("Invalidating {} in Varnish".format(title))
                invalidate_title(title)

            if data["method"] == "remove_index_record_from_cache":
                title = data["args"][0]
                logger.info("Invalidating {} in Varnish".format(title))
                invalidate_title(title)
예제 #2
0
    def _process_completion(self, data):
        """

        :param data:
            data["obj"]
            data["method"]
            data["args"]
            data["id"]
        :return:
        """
        if data["obj"] == "library":

            if data["method"] == "refresh_index_record_in_cache":
                title = data["args"][-1]  # Sometimes this is first arg, sometimes second.  Always last.
                logger.info("Invalidating {} in Varnish".format(title))
                invalidate_title(title)

            if data["method"] == "remove_index_record_from_cache":
                title = data["args"][0]
                logger.info("Invalidating {} in Varnish".format(title))
                invalidate_title(title)