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
e9355833
Commit
e9355833
authored
Oct 15, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix auto reply
parent
cf6a8771
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
auto_reply_per_1d_to_pictorial.py
vest/reply/auto_reply_per_1d_to_pictorial.py
+2
-5
auto_reply_per_2h_to_topic.py
vest/reply/auto_reply_per_2h_to_topic.py
+1
-1
No files found.
vest/reply/auto_reply_per_1d_to_pictorial.py
View file @
e9355833
...
@@ -38,8 +38,8 @@ def get_data(numtime1, numtime2):
...
@@ -38,8 +38,8 @@ def get_data(numtime1, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
=
pc
.
cursor
()
cursor
.
execute
(
cursor
.
execute
(
"SELECT
pictorial_id FROM community_pictorial_topic WHERE is_online=1 and (create_time >= '
%
s' and create_time < '
%
s') group by pictorial_id
"
%
(
"SELECT
id FROM community_pictorial WHERE is_online=1 and (create_time >= '
%
s' and create_time < '
%
s')
"
%
(
numtime
1
,
numtime2
))
numtime
2
,
numtime1
))
res
=
cursor
.
fetchall
()
res
=
cursor
.
fetchall
()
return
res
and
[
r
for
r
,
in
res
]
or
[]
return
res
and
[
r
for
r
,
in
res
]
or
[]
...
@@ -62,9 +62,6 @@ def batch_handle(pictorial_id_list):
...
@@ -62,9 +62,6 @@ def batch_handle(pictorial_id_list):
def
auto_reply_per_1d_to_pictorial
():
def
auto_reply_per_1d_to_pictorial
():
# 问题自动增加回答
# 问题自动增加回答
# todo topic_vote_cnt和community_pictorial_topic
# todo 1天前发的问题:[0-1]个评论 6天前发的问题:[0-1]个评论 这个是什么鬼
# todo 怎么禁止作者评论
pictorial_id_list
=
[]
pictorial_id_list
=
[]
try
:
try
:
logging
.
info
(
"comment offline pictorial"
)
logging
.
info
(
"comment offline pictorial"
)
...
...
vest/reply/auto_reply_per_2h_to_topic.py
View file @
e9355833
...
@@ -14,7 +14,7 @@ def get_data(numtime, numtime2):
...
@@ -14,7 +14,7 @@ def get_data(numtime, numtime2):
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
pc
=
pymysql
.
connect
(
host
=
host
,
user
=
user
,
passwd
=
passwd
,
db
=
db
,
port
=
3306
)
cursor
=
pc
.
cursor
()
cursor
=
pc
.
cursor
()
cursor
.
execute
(
cursor
.
execute
(
"SELECT
user_
id FROM topic WHERE is_online=1 and (create_time >= '
%
s' and create_time <= '
%
s' )"
%
(
"SELECT id FROM topic WHERE is_online=1 and (create_time >= '
%
s' and create_time <= '
%
s' )"
%
(
numtime2
,
numtime
))
numtime2
,
numtime
))
res
=
cursor
.
fetchall
()
res
=
cursor
.
fetchall
()
return
res
and
[
r
for
r
,
in
res
]
or
[]
return
res
and
[
r
for
r
,
in
res
]
or
[]
...
...
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