correctly put timeout event

This commit is contained in:
ahmadbilalkhalid 2019-07-25 18:21:32 +05:00
parent b198048ed8
commit d079acadf2
1 changed files with 1 additions and 1 deletions

View File

@ -89,4 +89,4 @@ def create_timeout_event(timeout, key_prefix, etcd_client):
time.sleep(timeout) time.sleep(timeout)
_value = {"status": "TIMEOUT", "last_timeout": datetime.utcnow().isoformat()} _value = {"status": "TIMEOUT", "last_timeout": datetime.utcnow().isoformat()}
_key = path.join(f"{key_prefix}", "TIMEOUT") _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))