示例#1
0
def posttrans_hook(conduit):
    if not conduit.confBool("main", "supress_debug"):
        conduit.info(2, "Uploading Tracer Profile")
    try:
        upload_tracer_profile(query_apps, conduit)
    except:
        if not conduit.confBool("main", "supress_errors"):
            conduit.error(2, "Unable to upload Tracer Profile")
示例#2
0
def posttrans_hook(conduit):
    if not conduit.confBool("main", "supress_debug"):
        conduit.info(2, "Uploading Tracer Profile")
    try:
        upload_tracer_profile(query_apps, conduit)
    except:
        if not conduit.confBool("main", "supress_errors"):
            conduit.error(2, "Unable to upload Tracer Profile")
    def PLUGINEND(self, headers, body):
        logging.info("PLUGINEND")

        logging.info("Uploading Tracer Profile")
        try:
            upload_tracer_profile(self.collect_apps)
        except:
            logging.error("Unable to upload Tracer Profile")

        self.ack()
    def transaction(self):
        conf = self.read_config(self.base.conf)
        enabled = (conf.has_section('main')
                   and conf.has_option('main', 'enabled')
                   and conf.getboolean('main', 'enabled'))

        if enabled:
            if (conf.has_option('main', 'supress_debug') and not conf.getboolean('main', 'supress_debug')):
                logger.info("Uploading Tracer Profile")
            try:
                upload_tracer_profile(query_apps, self)
            except Exception:
                if (conf.has_option('main', 'supress_errors') and not conf.getboolean('main', 'supress_errors')):
                    logger.error("Unable to upload Tracer Profile")
    def transaction(self):
        conf = self.read_config(self.base.conf)
        enabled = (conf.has_section('main')
                   and conf.has_option('main', 'enabled')
                   and conf.getboolean('main', 'enabled'))

        if enabled:
            if (conf.has_option('main', 'supress_debug')
                    and not conf.getboolean('main', 'supress_debug')):
                logger.info("Uploading Tracer Profile")
            try:
                """
                Unlike yum, the transaction is already written to the DB
                by this point so we don't need to do any work to give Tracer
                a list of affected apps.
                """
                upload_tracer_profile(query_affected_apps, self)
            except Exception:
                if (conf.has_option('main', 'supress_errors')
                        and not conf.getboolean('main', 'supress_errors')):
                    logger.error("Unable to upload Tracer Profile")
 def run(self):
     upload_tracer_profile(query_apps, None)