Fixing the ttl on etcd.

This commit is contained in:
Charlton Austin 2016-12-02 13:27:47 -05:00
parent 0ae0865372
commit 8157c9cf33

View file

@ -30,7 +30,7 @@ class EtcdCanceller(object):
""" Writes etcd message to cancel build_uuid. """
logger.info("Cancelling build %s".format(build_uuid))
try:
self._etcd_client.write("{}{}".format(self._cancel_prefix, build_uuid), build_uuid, ttl=0)
self._etcd_client.write("{}{}".format(self._cancel_prefix, build_uuid), build_uuid, ttl=60)
return True
except etcd.EtcdException:
logger.exception("Failed to write to etcd client %s", build_uuid)