Skip to content

Commit 202ceff

Browse files
authored
Merge pull request #116 from jinghao1/master
solve some policy slow
2 parents 4e437b2 + 3b379db commit 202ceff

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

dongtai_agent_python/assess/common_hook.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@ def __init__(self, origin_method, policy_rule):
1616

1717
def __call__(self, *args, **kwargs):
1818
# edit by song to add speed
19-
# with scope.scope(scope.SCOPE_AGENT):
20-
# result = self.policy_rule.origin_method(*args, **kwargs)
21-
if self.policy_rule.node_type == const.NODE_TYPE_FILTER:
22-
with scope.scope(scope.SCOPE_AGENT):
23-
result = self.policy_rule.origin_method(*args, **kwargs)
24-
else:
19+
with scope.scope(scope.SCOPE_AGENT):
2520
result = self.policy_rule.origin_method(*args, **kwargs)
26-
2721
if scope.in_scope(scope.SCOPE_AGENT):
2822
return result
2923

0 commit comments

Comments
 (0)