Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ch_util/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import logging
from os import path
import time
import socket
import peewee as pw
import tabulate

Expand Down Expand Up @@ -235,16 +234,19 @@ def __init__(self, acqs=(), node_spoof=None):
import copy

# Which nodes do we have available?
host = socket.gethostname().split(".")[0]
self._my_node = []
self._node_spoof = node_spoof

connect_database()

if not node_spoof:
# If not given a node list, search all active archive nodes
logging.warning(
"No node_spoof provided. Searching all active archive nodes."
)
for n in (
di.StorageNode.select()
.where(di.StorageNode.host == host)
.where(di.StorageNode.archive)
.where(di.StorageNode.active)
):
self._my_node.append(n)
Expand Down