Commit c0f210eb authored by Jürgen Haas's avatar Jürgen Haas

Change requests to use ip address and not hostname to avoid millions of local dns requests

parent 3e5fed25
......@@ -10,6 +10,7 @@ import datetime
import json
import os
import requests
import socket
import threading
import time
import types
......@@ -76,6 +77,7 @@ class Host:
self.latest_change = 0
self.alarms = {}
self.widget = None
self.ip = socket.gethostbyname(self.hostname)
self._queue('new host')
def watch(self):
......@@ -138,7 +140,7 @@ class Host:
@property
def url(self):
# type: () -> basestring
return 'http://%s:19999' % self.hostname
return 'http://%s:19999' % self.ip
@property
def fullname(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment