correctly put timeout event

This commit is contained in:
ahmadbilalkhalid 2019-07-25 18:21:32 +05:00
parent b198048ed8
commit d079acadf2

View file

@ -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))