From 9fbf500b6cf0c25be87c8303999e5f7afe980955 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 1 Mar 2017 09:38:11 -0500 Subject: [PATCH] Make configuration of detected things be concurrent This should speed up discovery in event of a slow target. --- confluent_server/confluent/discovery/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 0ebcbde2..8403dda9 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -1,4 +1,4 @@ -# Copyright 2016 Lenovo +# Copyright 2016-2017 Lenovo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -197,6 +197,10 @@ def _recheck_nodes(nodeattribs, configmanager): def safe_detected(info): + eventlet.spawn_n(eval_detected, info) + + +def eval_detected(info): try: return detected(info) except Exception as e: