@@ -130,7 +130,6 @@ def fetchData(requestContext, pathExprs):
130
130
# Convert to list if given single path
131
131
if not isinstance (pathExprs , list ):
132
132
pathExprs = [pathExprs ]
133
- pathExprs = set (pathExprs )
134
133
135
134
data_store = DataStore ()
136
135
multi_nodes = defaultdict (list )
@@ -140,14 +139,15 @@ def fetchData(requestContext, pathExprs):
140
139
141
140
# Group nodes that support multiple fetches
142
141
for pathExpr in pathExprs :
143
- for node in app .store .find (pathExpr ):
142
+ for node in app .store .find (pathExpr , startTime , endTime ):
144
143
if not node .is_leaf :
145
144
continue
145
+ if node .path not in path_to_exprs :
146
+ if hasattr (node , '__fetch_multi__' ):
147
+ multi_nodes [node .__fetch_multi__ ].append (node )
148
+ else :
149
+ single_nodes .append (node )
146
150
path_to_exprs [node .path ].append (pathExpr )
147
- if hasattr (node , '__fetch_multi__' ):
148
- multi_nodes [node .__fetch_multi__ ].append (node )
149
- else :
150
- single_nodes .append (node )
151
151
152
152
# Multi fetches
153
153
for finder in app .store .finders :
@@ -159,7 +159,7 @@ def fetchData(requestContext, pathExprs):
159
159
time_info , series = finder .fetch_multi (nodes , startTime , endTime )
160
160
for path , values in series .items ():
161
161
data_store .add_data (path , time_info , values ,
162
- path_to_exprs [node . path ])
162
+ path_to_exprs [path ])
163
163
164
164
# Single fetches
165
165
fetches = [
0 commit comments