def deregister_services(container_id): services_dict = consul_query('agent/services') for service_id, service_dict in services_dict.items(): if service_id.startswith(container_id): consul_get('agent/service/deregister/{service_id}'.format(**locals())) try: kv.kv_remove("start_timestamp/" + container_id) except Exception as e: get_logger().exception(e)
def deregister_services(container_id): services_dict = consul_query('agent/services') for service_id, service_dict in services_dict.items(): if service_id.startswith(container_id): consul_get('agent/service/deregister/{service_id}'.format(**locals())) try: kv.kv_remove("start_timestamp/" + container_id) except Exception as e: traceback.print_exc()
def deregister_services(container_id): services_dict = consul_query('agent/services') for service_id, service_dict in services_dict.items(): if service_id.startswith(container_id): consul_get('agent/service/deregister/{service_id}'.format(**locals())) try: kv.kv_remove("start_timestamp/" + container_id) except Exception as e: get_logger().exception(e) try: kv.kv_remove("single_active_instance/" + service_id) except Exception as e: get_logger().exception(e)