Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
physical
Commits
27fc13bd
Commit
27fc13bd
authored
Mar 21, 2019
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
43d2213a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
es.py
libs/es.py
+1
-1
topic.py
search/views/topic.py
+6
-5
No files found.
libs/es.py
View file @
27fc13bd
...
@@ -231,7 +231,7 @@ class ESPerform(object):
...
@@ -231,7 +231,7 @@ class ESPerform(object):
logging
.
error
(
"catch exception,item:
%
s,err_msg:
%
s"
%
(
str
(
item
),
traceback
.
format_exc
()))
logging
.
error
(
"catch exception,item:
%
s,err_msg:
%
s"
%
(
str
(
item
),
traceback
.
format_exc
()))
return
True
return
True
if
high_num
>
len
(
es_nodes_list
)
/
5
:
if
high_num
>
3
:
logging
.
info
(
"check es_nodes_load high,cpu load:
%
s"
%
str
(
es_nodes_info_list
))
logging
.
info
(
"check es_nodes_load high,cpu load:
%
s"
%
str
(
es_nodes_info_list
))
return
True
return
True
else
:
else
:
...
...
search/views/topic.py
View file @
27fc13bd
...
@@ -169,11 +169,12 @@ def home_recommend(device_id="", user_id=-1, offset=0, size=10, query_type=Topic
...
@@ -169,11 +169,12 @@ def home_recommend(device_id="", user_id=-1, offset=0, size=10, query_type=Topic
recommend_topic_ids
=
list
()
recommend_topic_ids
=
list
()
try
:
es_node_load_high_flag
=
False
es_node_load_high_flag
=
ESPerform
.
if_es_node_load_high
(
ESPerform
.
get_cli
())
# try:
except
:
# es_node_load_high_flag = ESPerform.if_es_node_load_high(ESPerform.get_cli())
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
# except:
es_node_load_high_flag
=
True
# logging.error("catch exception,err_msg:%s" % traceback.format_exc())
# es_node_load_high_flag = True
if
es_node_load_high_flag
:
if
es_node_load_high_flag
:
temp_downgrading_key
=
"physical:home_recommend:user_id:241407656:query_type:1"
temp_downgrading_key
=
"physical:home_recommend:user_id:241407656:query_type:1"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment