diff options
Diffstat (limited to 'poll.go')
| -rw-r--r-- | poll.go | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -48,10 +48,6 @@ func (h *HyperT) pollHypervisor() { d.CurrentState = "ON" d.lastpoll = time.Now() - // this means the droplet is still where it was before - if d.h.pb.Hostname == h.pb.Hostname { - continue - } if d.h == nil { // this means the droplet was in the config file @@ -65,6 +61,14 @@ func (h *HyperT) pollHypervisor() { } log.Log(EVENT, "new droplet", d.pb.Hostname, "on", h.pb.Hostname, "(in config file without preferred hypervisor)") + d.h = h + continue + } + + // this means the droplet is still where it was before + if d.h.pb.Hostname != h.pb.Hostname { + log.Log(EVENT, "droplet", d.h.pb.Hostname, "moved to", h.pb.Hostname) + continue } d.h = h } |
