mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-07 20:58:27 +08:00
A new method _map_message is added for converting a message object to corresponding event handler and module build. This is used to shorten the process_message method. process_message is refactored so that: * when handler is NO_OP, just return as earlier as possible because setting it make no sense to set MBSConsumer.current_module_build_id back and forth. * Re-raise error thrown from handler execution so that the caller is able to get a chance to collect monitoring metric inside except clause handling Exception. Otherwise, no failed metric is collected. This is the major problem this patch is to fix. * Ensure MBSConsumer.current_module_build_id is set back to None. In consumer method, no traceback is logged inside except clause catching Exception. process_method does that. Signed-off-by: Chenxiong Qi <cqi@redhat.com>