@classmethod
    def classify(cls, queue, classifiers, error, threshold):
        categories = cls.get_all_categories(queue)
        matched_cat = None
        start = time.time()
        for classifier in classifiers:
            matched = False
            for cat in categories:
                if classifier.check_message(cat, error, threshold):
                    cat.events.add_event(error)
                    matched_cat = cat
                    matched = True
                    break
            if matched:
                break
        else:
            cat_sig = error['sig']
            matched_cat = cls.create(queue, cat_sig, event=error)

        end = time.time()
        log.info('Classification took %.2f seconds for matched category %s' % (
            end - start, matched_cat.cat_id))
        return matched_cat
Determine which category, if any, a signature belongs to.
dataset/ETHPy150Open gmcquillan/firetower/firetower/category.py/Category.classify