# Use nonblock event to eliminate busy loop
# If there are no notifying zones, clear the event bit and wait.
self._nonblock_event = threading.Event()
+ self._counter = Counter()
def _init_notify_out(self, datasrc_file):
'''Get all the zones name and its notify target's address.
sock.sendto(render.get_data(), 0, addrinfo)
# count notifying by IPv4 or IPv6 for statistics
if zone_notify_info.get_socket().family == socket.AF_INET:
- Counter.inc_notifyoutv4(zone_notify_info.zone_name)
+ self._counter.inc('zones', zone_notify_info.zone_name,
+ 'notifyoutv4')
elif zone_notify_info.get_socket().family == socket.AF_INET6:
- Counter.inc_notifyoutv6(zone_notify_info.zone_name)
+ self._counter.inc('zones', zone_notify_info.zone_name,
+ 'notifyoutv6')
logger.info(NOTIFY_OUT_SENDING_NOTIFY, addrinfo[0],
addrinfo[1])
except (socket.error, addr.InvalidAddress) as err: