From d079acadf29e6df55c329574604148631d4ad4bc Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Khalid Date: Thu, 25 Jul 2019 18:21:32 +0500 Subject: [PATCH] correctly put timeout event --- etcd_wrapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etcd_wrapper.py b/etcd_wrapper.py index 26d0edc..a631aa3 100644 --- a/etcd_wrapper.py +++ b/etcd_wrapper.py @@ -89,4 +89,4 @@ def create_timeout_event(timeout, key_prefix, etcd_client): time.sleep(timeout) _value = {"status": "TIMEOUT", "last_timeout": datetime.utcnow().isoformat()} _key = path.join(f"{key_prefix}", "TIMEOUT") - etcd_client.put(_key, _value, value_in_json=True) + etcd_client.put(_key.encode("utf-8"), json.dumps(_value))