def _refresh_power_devices(self):
# Ensure that we have a fresh view of the DB
with transaction.commit_manually():
transaction.commit()
with self._lock:
for device in PowerControlDevice.objects.all():
if device.sockaddr not in self._power_devices:
self._power_devices[device.sockaddr] = device
评论列表
文章目录