Commit 98283ef0 authored by lixiaofang's avatar lixiaofang

try except

parent 29553b5d
......@@ -2,8 +2,6 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fd1f0b61-1139-44e5-87e7-f8b86ff52376" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/auto_pick.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_pick.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_star_topic.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_star_topic.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/auto_urge.py" beforeDir="false" afterPath="$PROJECT_DIR$/auto_urge.py" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
......@@ -87,7 +85,7 @@
<entry key="cuigeng" value="1" />
<entry key="data" value="12" />
<entry key="dummy" value="31" />
<entry key="py" value="7749" />
<entry key="py" value="7769" />
<entry key="unr_data" value="1" />
<entry key="xuqiu" value="1" />
</counts>
......@@ -95,7 +93,7 @@
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="PLAIN_TEXT" value="177" />
<entry key="Python" value="7749" />
<entry key="Python" value="7769" />
</counts>
</usages-collector>
</session>
......@@ -117,11 +115,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="174">
<caret line="136" column="61" selection-start-line="136" selection-start-column="61" selection-end-line="136" selection-end-column="61" />
<state relative-caret-position="150">
<caret line="172" column="49" lean-forward="true" selection-start-line="172" selection-start-column="49" selection-end-line="172" selection-end-column="49" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#338#515#0" />
......@@ -235,11 +233,11 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="116">
<caret line="107" column="22" selection-start-line="107" selection-start-column="22" selection-end-line="107" selection-end-column="22" />
<state relative-caret-position="393">
<caret line="139" column="4" selection-start-line="139" selection-start-column="4" selection-end-line="139" selection-end-column="4" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#300#477#0" />
......@@ -302,14 +300,14 @@
<option value="$PROJECT_DIR$/dd.py" />
<option value="$PROJECT_DIR$/auto_follow_new.py" />
<option value="$PROJECT_DIR$/auto_pick.py" />
<option value="$PROJECT_DIR$/auto_urge.py" />
<option value="$PROJECT_DIR$/auto_star_topic.py" />
<option value="$PROJECT_DIR$/auto_urge.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="680" />
<option name="y" value="329" />
<option name="x" value="20" />
<option name="y" value="31" />
<option name="width" value="1705" />
<option name="height" value="727" />
</component>
......@@ -490,10 +488,10 @@
<servers />
</component>
<component name="ToolWindowManager">
<frame x="132" y="23" width="1705" height="727" extended-state="1" />
<frame x="20" y="31" width="1705" height="727" extended-state="0" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" weight="0.1300475" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.12945369" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
......@@ -504,7 +502,7 @@
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<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="Terminal" order="8" weight="0.012598425" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.19212599" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
......@@ -818,30 +816,30 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="116">
<caret line="107" column="22" selection-start-line="107" selection-start-column="22" selection-end-line="107" selection-end-column="22" />
<state relative-caret-position="150">
<caret line="172" column="49" lean-forward="true" selection-start-line="172" selection-start-column="49" selection-end-line="172" selection-end-column="49" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#300#477#0" />
<element signature="e#501#888#0" />
<element signature="e#909#1593#0" />
<element signature="e#2055#2268#0" />
<element signature="e#2297#2873#0" />
<element signature="e#338#515#0" />
<element signature="e#539#926#0" />
<element signature="e#947#1632#0" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/auto_star_topic.py">
<entry file="file://$PROJECT_DIR$/auto_urge.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="174">
<caret line="136" column="61" selection-start-line="136" selection-start-column="61" selection-end-line="136" selection-end-column="61" />
<state relative-caret-position="393">
<caret line="139" column="4" selection-start-line="139" selection-start-column="4" selection-end-line="139" selection-end-column="4" />
<folding>
<element signature="e#0#15#0" expanded="true" />
<element signature="e#338#515#0" />
<element signature="e#539#926#0" />
<element signature="e#947#1632#0" />
<element signature="e#300#477#0" />
<element signature="e#501#888#0" />
<element signature="e#909#1593#0" />
<element signature="e#2055#2268#0" />
<element signature="e#2297#2873#0" />
</folding>
</state>
</provider>
......
......@@ -147,7 +147,7 @@ def get_data(numtime):
cursor.execute("SELECT distinct(user_id) FROM topic WHERE create_time LIKE '%%%%%s%%%%'" %numtime)
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % data)
logging.info("Database version : %s " % user_id)
db.close()
return user_id
......
......@@ -121,21 +121,24 @@ def get_data(numtime):
return None
def get_star_useid(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute(
"SELECT user_id FROM topic WHERE content_level =4 or content_level =5 and create_time LIKE '%%%%%s%%%%'" % numtime)
"SELECT user_id FROM topic WHERE is_online=1 and content_level =4 or content_level =5 and create_time LIKE '%%%%%s%%%%'" % numtime)
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
db.close()
return user_id
except:
logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None
if __name__ == "__main__":
try:
......
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