Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cybertron
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
cybertron
Commits
98283ef0
Commit
98283ef0
authored
Dec 08, 2018
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try except
parent
29553b5d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
32 deletions
+33
-32
workspace.xml
.idea/workspace.xml
+28
-30
auto_pick.py
auto_pick.py
+1
-1
auto_urge.py
auto_urge.py
+4
-1
No files found.
.idea/workspace.xml
View file @
98283ef0
...
...
@@ -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=
"77
4
9"
/>
<entry
key=
"py"
value=
"77
6
9"
/>
<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=
"77
4
9"
/>
<entry
key=
"Python"
value=
"77
6
9"
/>
</counts>
</usages-collector>
</session>
...
...
@@ -117,11 +115,11 @@
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/auto_star_topic.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
74
"
>
<caret
line=
"1
36"
column=
"61"
selection-start-line=
"136"
selection-start-column=
"61"
selection-end-line=
"136"
selection-end-column=
"61
"
/>
<state
relative-caret-position=
"1
50
"
>
<caret
line=
"1
72"
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=
"
fals
e"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/auto_urge.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
116
"
>
<caret
line=
"1
07"
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=
"1
39"
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=
"
68
0"
/>
<option
name=
"y"
value=
"3
29
"
/>
<option
name=
"x"
value=
"
2
0"
/>
<option
name=
"y"
value=
"3
1
"
/>
<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
a
nchor=
"bottom"
id=
"Terminal"
order=
"8"
weight=
"0.012598425
"
/>
<window_info
a
ctive=
"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=
"1
16
"
>
<caret
line=
"1
07"
column=
"22"
selection-start-line=
"107"
selection-start-column=
"22"
selection-end-line=
"107"
selection-end-column=
"22
"
/>
<state
relative-caret-position=
"1
50
"
>
<caret
line=
"1
72"
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=
"13
6"
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=
"13
9"
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>
...
...
auto_pick.py
View file @
98283ef0
...
...
@@ -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
...
...
auto_urge.py
View file @
98283ef0
...
...
@@ -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
:
...
...
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