Make etcd calls in callInThread
Change-Id: I3b4e28eb54440646fec050d2e2a13194c962c639
diff --git a/voltha/core/config/config_backend.py b/voltha/core/config/config_backend.py
index d906348..84b9840 100644
--- a/voltha/core/config/config_backend.py
+++ b/voltha/core/config/config_backend.py
@@ -16,6 +16,7 @@
from common.utils.asleep import asleep
from requests import ConnectionError
from twisted.internet.defer import inlineCallbacks, returnValue
+from twisted.internet import reactor
import etcd3
import structlog
@@ -226,10 +227,10 @@
return self._retry('GET', *args, **kw)
def _kv_put(self, *args, **kw):
- return self._retry('PUT', *args, **kw)
+ reactor.callInThread(self._retry, 'PUT', *args, **kw)
def _kv_delete(self, *args, **kw):
- return self._retry('DELETE', *args, **kw)
+ reactor.callInThread(self._retry, 'DELETE', *args, **kw)
def _retry(self, operation, *args, **kw):