Commit e3e43b11 authored by lixiaofang's avatar lixiaofang

add

parent 6d806be0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7b835479-ee84-40d6-9b97-0e9285d92119" name="Default Changelist" comment=""> <list default="true" id="7b835479-ee84-40d6-9b97-0e9285d92119" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/reply_comment1.py" beforeDir="false" afterPath="$PROJECT_DIR$/reply_comment1.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
...@@ -13,103 +13,105 @@ ...@@ -13,103 +13,105 @@
<session id="-334786743"> <session id="-334786743">
<usages-collector id="statistics.file.extensions.open"> <usages-collector id="statistics.file.extensions.open">
<counts> <counts>
<entry key="py" value="18" /> <entry key="py" value="19" />
<entry key="txt" value="3" /> <entry key="txt" value="3" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.open"> <usages-collector id="statistics.file.types.open">
<counts> <counts>
<entry key="PLAIN_TEXT" value="3" /> <entry key="PLAIN_TEXT" value="3" />
<entry key="Python" value="18" /> <entry key="Python" value="19" />
</counts> </counts>
</usages-collector> </usages-collector>
<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="1156" /> <entry key="py" value="1203" />
</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="1156" /> <entry key="Python" value="1203" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <splitter split-orientation="horizontal" split-proportion="0.5">
<file pinned="false" current-in-tab="false"> <split-first>
<entry file="file://$PROJECT_DIR$/auto_request.py"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="102"> <entry file="file://$PROJECT_DIR$/auto_request.py">
<caret line="129" column="32" lean-forward="true" selection-start-line="129" selection-start-column="32" selection-end-line="129" selection-end-column="32" /> <provider selected="true" editor-type-id="text-editor">
<folding> <state relative-caret-position="192">
<element signature="e#0#15#0" expanded="true" /> <caret line="394" column="4" selection-start-line="394" selection-start-column="4" selection-end-line="394" selection-end-column="4" />
<marker date="1562919187000" expanded="true" signature="9854:9859" ph="..." /> <folding>
</folding> <element signature="e#0#15#0" expanded="true" />
</state> <marker date="1562919187000" expanded="true" signature="9854:9859" ph="..." />
</provider> </folding>
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="false"> </entry>
<entry file="file://$PROJECT_DIR$/answer_reply2.py"> </file>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="247"> <entry file="file://$PROJECT_DIR$/answer_reply2.py">
<caret line="52" column="54" lean-forward="true" selection-start-line="52" selection-start-column="54" selection-end-line="52" selection-end-column="54" /> <provider selected="true" editor-type-id="text-editor">
</state> <state relative-caret-position="247">
</provider> <caret line="52" column="54" lean-forward="true" selection-start-line="52" selection-start-column="54" selection-end-line="52" selection-end-column="54" />
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="false"> </entry>
<entry file="file://$PROJECT_DIR$/answer_reply1.py"> </file>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="75"> <entry file="file://$PROJECT_DIR$/answer_reply1.py">
<caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" /> <provider selected="true" editor-type-id="text-editor">
</state> <state relative-caret-position="-472">
</provider> <caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" />
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="true"> </entry>
<entry file="file://$PROJECT_DIR$/reply_comment1.py"> </file>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="true">
<state relative-caret-position="285"> <entry file="file://$PROJECT_DIR$/reply_comment2.py">
<caret line="19" column="22" selection-start-line="19" selection-start-column="22" selection-end-line="19" selection-end-column="22" /> <provider selected="true" editor-type-id="text-editor">
<folding> <state relative-caret-position="315">
<element signature="e#0#16#0" expanded="true" /> <caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" />
</folding> <folding>
</state> <element signature="e#0#16#0" expanded="true" />
</provider> </folding>
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="false"> </entry>
<entry file="file://$PROJECT_DIR$/reply_comment2.py"> </file>
<provider selected="true" editor-type-id="text-editor"> <file pinned="false" current-in-tab="false">
<state relative-caret-position="60"> <entry file="file://$PROJECT_DIR$/reply_comment3.py">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" /> <provider selected="true" editor-type-id="text-editor">
</state> <state relative-caret-position="60">
</provider> <caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
</entry> </state>
</file> </provider>
<file pinned="false" current-in-tab="false"> </entry>
<entry file="file://$PROJECT_DIR$/answer_reply3.py"> </file>
<provider selected="true" editor-type-id="text-editor"> </leaf>
<state relative-caret-position="45"> </split-first>
<caret line="3" column="11" lean-forward="true" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" /> <split-second>
</state> <leaf>
</provider> <file pinned="false" current-in-tab="true">
</entry> <entry file="file://$PROJECT_DIR$/reply_comment1.py">
</file> <provider selected="true" editor-type-id="text-editor">
<file pinned="false" current-in-tab="false"> <state relative-caret-position="270">
<entry file="file://$PROJECT_DIR$/reply_comment3.py"> <caret line="18" column="69" lean-forward="true" selection-start-line="17" selection-start-column="8" selection-end-line="18" selection-end-column="69" />
<provider selected="true" editor-type-id="text-editor"> <folding>
<state relative-caret-position="60"> <element signature="e#0#16#0" expanded="true" />
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" /> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
</leaf> </leaf>
</split-second>
</splitter>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES"> <option name="RECENT_TEMPLATES">
...@@ -225,7 +227,7 @@ ...@@ -225,7 +227,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 content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.08816521" /> <window_info content_ui="combo" id="Project" order="2" sideWeight="0.7872763" visible="true" weight="0.0" />
<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" />
...@@ -235,7 +237,7 @@ ...@@ -235,7 +237,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 active="true" 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.03156146" />
<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" />
...@@ -437,17 +439,24 @@ ...@@ -437,17 +439,24 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/answer_reply2.py"> <entry file="file://$PROJECT_DIR$/reply_comment3.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="247"> <state relative-caret-position="60">
<caret line="52" column="54" lean-forward="true" selection-start-line="52" selection-start-column="54" selection-end-line="52" selection-end-column="54" /> <caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/answer_reply3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="11" lean-forward="true" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_request.py"> <entry file="file://$PROJECT_DIR$/auto_request.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102"> <state relative-caret-position="192">
<caret line="129" column="32" lean-forward="true" selection-start-line="129" selection-start-column="32" selection-end-line="129" selection-end-column="32" /> <caret line="394" column="4" selection-start-line="394" selection-start-column="4" selection-end-line="394" selection-end-column="4" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
<marker date="1562919187000" expanded="true" signature="9854:9859" ph="..." /> <marker date="1562919187000" expanded="true" signature="9854:9859" ph="..." />
...@@ -455,38 +464,34 @@ ...@@ -455,38 +464,34 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/answer_reply1.py"> <entry file="file://$PROJECT_DIR$/answer_reply2.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75"> <state relative-caret-position="247">
<caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" /> <caret line="52" column="54" lean-forward="true" selection-start-line="52" selection-start-column="54" selection-end-line="52" selection-end-column="54" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/answer_reply3.py"> <entry file="file://$PROJECT_DIR$/answer_reply1.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="-472">
<caret line="3" column="11" lean-forward="true" selection-start-line="3" selection-start-column="11" selection-end-line="3" selection-end-column="11" /> <caret line="5" selection-start-line="5" selection-end-line="5" selection-end-column="26" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/reply_comment2.py"> <entry file="file://$PROJECT_DIR$/reply_comment2.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60"> <state relative-caret-position="315">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" /> <caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" />
</state> <folding>
</provider> <element signature="e#0#16#0" expanded="true" />
</entry> </folding>
<entry file="file://$PROJECT_DIR$/reply_comment3.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="26" selection-start-line="4" selection-start-column="26" selection-end-line="4" selection-end-column="26" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/reply_comment1.py"> <entry file="file://$PROJECT_DIR$/reply_comment1.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285"> <state relative-caret-position="270">
<caret line="19" column="22" selection-start-line="19" selection-start-column="22" selection-end-line="19" selection-end-column="22" /> <caret line="18" column="69" lean-forward="true" selection-start-line="17" selection-start-column="8" selection-end-line="18" selection-end-column="69" />
<folding> <folding>
<element signature="e#0#16#0" expanded="true" /> <element signature="e#0#16#0" expanded="true" />
</folding> </folding>
......
...@@ -63,7 +63,6 @@ if __name__ == "__main__": ...@@ -63,7 +63,6 @@ if __name__ == "__main__":
{"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1]}) {"id": reply_id, "reply_user_id": reply_user_id, "answer": comment2, "topic_id": i[1]})
redis_client = set_reply_to_redis() redis_client = set_reply_to_redis()
logging.info("get nowwwwwwwww:%s" % minute) redis_client.hset(redis_key1, str(minute), json.dumps(reply_data_comment))
redis_client.hset(redis_key1, str(minute), reply_data_comment)
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -9,20 +9,16 @@ from auto_request import set_reply_to_redis, reply2, login ...@@ -9,20 +9,16 @@ from auto_request import set_reply_to_redis, reply2, login
if __name__ == "__main__": if __name__ == "__main__":
try: try:
logging.info("get-------------------------------get ")
now = datetime.datetime.now().minute now = datetime.datetime.now().minute
redis_key1 = "cybertron:set_reply_id:one" redis_key1 = "cybertron:set_reply_id:one"
redis_client = set_reply_to_redis() redis_client = set_reply_to_redis()
logging.info("get now -----munite:%s" % now)
have_reply1 = redis_client.hget(redis_key1, str(now - 5)) have_reply1 = redis_client.hget(redis_key1, str(now - 5))
if have_reply1: result = json.loads(str(have_reply1, encoding="utf-8"))
logging.info("get now -----have_reply1:%s" % have_reply1) if result:
result = json.loads(str(have_reply1, encoding="utf-8")) for item in result:
if result: cook = login()
for item in result: reply2(cook, item["topic_id"], item["answer"], item["id"])
cook = login() redis_client.hdel(redis_key1, str(now - 5))
reply2(cook, item["topic_id"], item["answer"], item["id"])
redis_client.hdel(redis_key1, str(now - 5))
except: except:
logging.error("catch exception,main:%s" % traceback.format_exc()) logging.error("catch exception,main:%s" % traceback.format_exc())
...@@ -9,9 +9,7 @@ if __name__ == "__main__": ...@@ -9,9 +9,7 @@ if __name__ == "__main__":
try: try:
redis_key1 = "cybertron:set_reply_id:three" redis_key1 = "cybertron:set_reply_id:three"
redis_client = set_reply_to_redis() redis_client = set_reply_to_redis()
have_reply1 = redis_client.get(redis_key1) have_reply1 = redis_client.get(redis_key1)
result = json.loads(str(have_reply1, encoding="utf-8")) result = json.loads(str(have_reply1, encoding="utf-8"))
if result: if result:
......
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