'Since threadpool\'s apply_async runs the callback only when the call to
this method ends without any exceptions, it is *very important* to
handle exceptions correctly here. Failure to do so will end up in
_task_done not called, which will make has_pending_work always return
True.
Python 3 has an error_callback in the apply_async method, which we could
use in the future.'

@task_decorator
def _audit(self, function_id, plugin, fuzzable_request, orig_resp):

    try:
        plugin.audit_with_copy(fuzzable_request, orig_resp)
    except Exception as e:
        self.handle_exception('audit', plugin.get_name(), fuzzable_request, e)
