Commit 11636385 authored by lixiaofang's avatar lixiaofang

add

parent 66ffbe75
...@@ -28,13 +28,13 @@ ...@@ -28,13 +28,13 @@
<usages-collector id="statistics.file.extensions.edit"> <usages-collector id="statistics.file.extensions.edit">
<counts> <counts>
<entry key="dummy" value="1" /> <entry key="dummy" value="1" />
<entry key="py" value="1504" /> <entry key="py" value="1518" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.edit"> <usages-collector id="statistics.file.types.edit">
<counts> <counts>
<entry key="PLAIN_TEXT" value="1" /> <entry key="PLAIN_TEXT" value="1" />
<entry key="Python" value="1504" /> <entry key="Python" value="1518" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.lifecycle.project"> <usages-collector id="statistics.lifecycle.project">
...@@ -68,25 +68,38 @@ ...@@ -68,25 +68,38 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/index_contrast/pictorial.py"> <entry file="file://$PROJECT_DIR$/index_contrast/pictorial.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45"> <state relative-caret-position="282">
<caret line="13" selection-start-line="13" selection-end-line="19" selection-end-column="27" /> <caret line="194" column="52" selection-start-line="194" selection-start-column="52" selection-end-line="194" selection-end-column="52" />
<folding> <folding>
<element signature="e#382#16835#0" /> <element signature="e#530#960#0" />
<element signature="e#1648#2194#0" />
<element signature="e#2272#3153#0" />
<element signature="e#3275#4024#0" />
<element signature="e#4129#4630#0" />
<element signature="e#4762#6096#0" />
<element signature="e#8486#9071#0" />
<element signature="e#9141#10450#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index_contrast/user.py"> <entry file="file://$PROJECT_DIR$/index_contrast/user.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="413"> <state relative-caret-position="-1015">
<caret line="479" column="93" selection-start-line="479" selection-start-column="93" selection-end-line="479" selection-end-column="93" /> <caret line="188" column="8" selection-start-line="188" selection-start-column="8" selection-end-line="188" selection-end-column="8" />
<folding> <folding>
<element signature="e#384#17208#0" /> <element signature="e#530#960#0" />
<element signature="e#1676#2222#0" />
<element signature="e#2300#3181#0" />
<element signature="e#3303#4052#0" />
<element signature="e#4157#4658#0" />
<element signature="e#4792#6126#0" />
<element signature="e#9522#10831#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -95,11 +108,21 @@ ...@@ -95,11 +108,21 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index_contrast/tag.py"> <entry file="file://$PROJECT_DIR$/index_contrast/tag.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315"> <state relative-caret-position="-7">
<caret line="21" selection-start-line="21" selection-end-line="448" /> <caret line="300" column="36" lean-forward="true" selection-start-line="300" selection-start-column="36" selection-end-line="300" selection-end-column="36" />
<folding> <folding>
<element signature="e#46#55#0" expanded="true" /> <element signature="e#46#55#0" expanded="true" />
<element signature="e#349#16802#0" /> <element signature="e#349#16802#0" />
<element signature="e#495#925#0" />
<element signature="e#1023#1547#0" />
<element signature="e#1613#2159#0" />
<element signature="e#2237#3118#0" />
<element signature="e#3240#3989#0" />
<element signature="e#4094#4595#0" />
<element signature="e#4729#6063#0" />
<element signature="e#6360#8356#0" />
<element signature="e#8453#9038#0" />
<element signature="e#9108#10417#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -137,8 +160,8 @@ ...@@ -137,8 +160,8 @@
<option value="$PROJECT_DIR$/reply_comment1.py" /> <option value="$PROJECT_DIR$/reply_comment1.py" />
<option value="$PROJECT_DIR$/answer_reply1.py" /> <option value="$PROJECT_DIR$/answer_reply1.py" />
<option value="$PROJECT_DIR$/index_contrast/tag.py" /> <option value="$PROJECT_DIR$/index_contrast/tag.py" />
<option value="$PROJECT_DIR$/index_contrast/pictorial.py" />
<option value="$PROJECT_DIR$/index_contrast/user.py" /> <option value="$PROJECT_DIR$/index_contrast/user.py" />
<option value="$PROJECT_DIR$/index_contrast/pictorial.py" />
</list> </list>
</option> </option>
</component> </component>
...@@ -231,7 +254,7 @@ ...@@ -231,7 +254,7 @@
<layout> <layout>
<window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" /> <window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" />
<window_info id="Favorites" order="1" side_tool="true" /> <window_info id="Favorites" order="1" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.23272438" /> <window_info content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.14932486" />
<window_info id="DB Browser" order="3" /> <window_info id="DB Browser" order="3" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3284974" /> <window_info anchor="bottom" id="Find" order="1" weight="0.3284974" />
...@@ -241,7 +264,7 @@ ...@@ -241,7 +264,7 @@
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" order="8" sideWeight="0.49960285" visible="true" weight="0.0" /> <window_info active="true" anchor="bottom" id="Terminal" order="8" sideWeight="0.49960285" visible="true" weight="0.0" />
<window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50039715" side_tool="true" weight="0.32890365" /> <window_info anchor="bottom" id="Event Log" order="9" sideWeight="0.50039715" side_tool="true" weight="0.32890365" />
<window_info anchor="bottom" id="Python Console" order="10" /> <window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="bottom" id="DB Execution Console" order="11" /> <window_info anchor="bottom" id="DB Execution Console" order="11" />
...@@ -298,12 +321,12 @@ ...@@ -298,12 +321,12 @@
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line"> <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/index_contrast/tag.py</url> <url>file://$PROJECT_DIR$/index_contrast/tag.py</url>
<line>169</line> <line>168</line>
<option name="timeStamp" value="10" /> <option name="timeStamp" value="10" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line"> <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/index_contrast/tag.py</url> <url>file://$PROJECT_DIR$/index_contrast/tag.py</url>
<line>21</line> <line>20</line>
<option name="timeStamp" value="12" /> <option name="timeStamp" value="12" />
</line-breakpoint> </line-breakpoint>
</breakpoints> </breakpoints>
...@@ -537,31 +560,54 @@ ...@@ -537,31 +560,54 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/index_contrast/tag.py"> <entry file="file://$PROJECT_DIR$/index_contrast/tag.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315"> <state relative-caret-position="-7">
<caret line="21" selection-start-line="21" selection-end-line="448" /> <caret line="300" column="36" lean-forward="true" selection-start-line="300" selection-start-column="36" selection-end-line="300" selection-end-column="36" />
<folding> <folding>
<element signature="e#46#55#0" expanded="true" /> <element signature="e#46#55#0" expanded="true" />
<element signature="e#349#16802#0" /> <element signature="e#349#16802#0" />
<element signature="e#495#925#0" />
<element signature="e#1023#1547#0" />
<element signature="e#1613#2159#0" />
<element signature="e#2237#3118#0" />
<element signature="e#3240#3989#0" />
<element signature="e#4094#4595#0" />
<element signature="e#4729#6063#0" />
<element signature="e#6360#8356#0" />
<element signature="e#8453#9038#0" />
<element signature="e#9108#10417#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/index_contrast/pictorial.py"> <entry file="file://$PROJECT_DIR$/index_contrast/user.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45"> <state relative-caret-position="-1015">
<caret line="13" selection-start-line="13" selection-end-line="19" selection-end-column="27" /> <caret line="188" column="8" selection-start-line="188" selection-start-column="8" selection-end-line="188" selection-end-column="8" />
<folding> <folding>
<element signature="e#382#16835#0" /> <element signature="e#530#960#0" />
<element signature="e#1676#2222#0" />
<element signature="e#2300#3181#0" />
<element signature="e#3303#4052#0" />
<element signature="e#4157#4658#0" />
<element signature="e#4792#6126#0" />
<element signature="e#9522#10831#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/index_contrast/user.py"> <entry file="file://$PROJECT_DIR$/index_contrast/pictorial.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="413"> <state relative-caret-position="282">
<caret line="479" column="93" selection-start-line="479" selection-start-column="93" selection-end-line="479" selection-end-column="93" /> <caret line="194" column="52" selection-start-line="194" selection-start-column="52" selection-end-line="194" selection-end-column="52" />
<folding> <folding>
<element signature="e#384#17208#0" /> <element signature="e#530#960#0" />
<element signature="e#1648#2194#0" />
<element signature="e#2272#3153#0" />
<element signature="e#3275#4024#0" />
<element signature="e#4129#4630#0" />
<element signature="e#4762#6096#0" />
<element signature="e#8486#9071#0" />
<element signature="e#9141#10450#0" />
</folding> </folding>
</state> </state>
</provider> </provider>
......
...@@ -48,6 +48,7 @@ class ESPerform(object): ...@@ -48,6 +48,7 @@ class ESPerform(object):
:return: :return:
""" """
try: try:
index_flag = None
assert (index_flag in [None, "read", "write"]) assert (index_flag in [None, "read", "write"])
official_index_name = cls.index_prefix + "-" + sub_index_name official_index_name = cls.index_prefix + "-" + sub_index_name
...@@ -191,8 +192,8 @@ class ESPerform(object): ...@@ -191,8 +192,8 @@ class ESPerform(object):
try: try:
assert (es_cli is not None) assert (es_cli is not None)
official_index_name = sub_index_name official_index_name = sub_index_name
# if sub_index_name != "mv-alpha-user-test-190711901": if sub_index_name != "mv-alpha-toipc-test-1907129011":
# official_index_name = cls.get_official_index_name(sub_index_name, "read") official_index_name = cls.get_official_index_name(sub_index_name, "read")
index_exists = es_cli.indices.exists(official_index_name) index_exists = es_cli.indices.exists(official_index_name)
if not index_exists: if not index_exists:
......
...@@ -18,6 +18,7 @@ ES_INFO_LIST = [ ...@@ -18,6 +18,7 @@ ES_INFO_LIST = [
] ]
ES_INDEX_PREFIX = "gm-dbmw" ES_INDEX_PREFIX = "gm-dbmw"
class ESPerform(object): class ESPerform(object):
cli_obj = None cli_obj = None
cli_info_list = ES_INFO_LIST cli_info_list = ES_INFO_LIST
...@@ -46,6 +47,7 @@ class ESPerform(object): ...@@ -46,6 +47,7 @@ class ESPerform(object):
:return: :return:
""" """
try: try:
index_flag = None
assert (index_flag in [None, "read", "write"]) assert (index_flag in [None, "read", "write"])
official_index_name = cls.index_prefix + "-" + sub_index_name official_index_name = cls.index_prefix + "-" + sub_index_name
...@@ -283,6 +285,7 @@ class ESPerform(object): ...@@ -283,6 +285,7 @@ class ESPerform(object):
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return True return True
# 先获取一部分数据 # 先获取一部分数据
es_cli_obj = ESPerform.get_cli() es_cli_obj = ESPerform.get_cli()
...@@ -362,12 +365,11 @@ for old_item in result_dict["hits"]: ...@@ -362,12 +365,11 @@ for old_item in result_dict["hits"]:
is_deleted = values["is_deleted"] is_deleted = values["is_deleted"]
if is_online != new_source["suggest"]["contexts"]["is_online"]: if is_online != new_source["suggest"]["contexts"]["is_online"]:
print(is_online) print(is_online)
print ("----is_online--------") print("----is_online--------")
if is_deleted != new_source["suggest"]["contexts"]["is_deleted"]: if is_deleted != new_source["suggest"]["contexts"]["is_deleted"]:
print(is_deleted) print(is_deleted)
print("-------is_deleted---------") print("-------is_deleted---------")
if old_source["is_deleted"] != new_source["is_deleted"]: if old_source["is_deleted"] != new_source["is_deleted"]:
print(old_source["is_deleted"]) print(old_source["is_deleted"])
print(new_source["is_deleted"]) print(new_source["is_deleted"])
......
...@@ -48,6 +48,7 @@ class ESPerform(object): ...@@ -48,6 +48,7 @@ class ESPerform(object):
:return: :return:
""" """
try: try:
index_flag = None
assert (index_flag in [None, "read", "write"]) assert (index_flag in [None, "read", "write"])
official_index_name = cls.index_prefix + "-" + sub_index_name official_index_name = cls.index_prefix + "-" + sub_index_name
...@@ -191,8 +192,8 @@ class ESPerform(object): ...@@ -191,8 +192,8 @@ class ESPerform(object):
try: try:
assert (es_cli is not None) assert (es_cli is not None)
official_index_name = sub_index_name official_index_name = sub_index_name
# if sub_index_name != "mv-alpha-user-test-190711901": if sub_index_name != "mv-alpha-user-test-190711901":
# official_index_name = cls.get_official_index_name(sub_index_name, "read") official_index_name = cls.get_official_index_name(sub_index_name, "read")
index_exists = es_cli.indices.exists(official_index_name) index_exists = es_cli.indices.exists(official_index_name)
if not index_exists: if not index_exists:
...@@ -237,7 +238,7 @@ class ESPerform(object): ...@@ -237,7 +238,7 @@ class ESPerform(object):
try: try:
assert (es_cli is not None) assert (es_cli is not None)
# official_index_name = cls.get_official_index_name(sub_index_name, "read") official_index_name = cls.get_official_index_name(sub_index_name, "read")
index_exists = es_cli.indices.exists(sub_index_name) index_exists = es_cli.indices.exists(sub_index_name)
if not index_exists: if not index_exists:
logging.error("index:%s is not existing,get_search_results error!" % sub_index_name) logging.error("index:%s is not existing,get_search_results error!" % sub_index_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment