Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
vest
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
2
Merge Requests
2
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
rank
vest
Commits
78d16ff4
Commit
78d16ff4
authored
Dec 26, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
6a3afab3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
auto_comment.py
comment/views/auto_comment.py
+1
-2
process_time.py
moment/views/process_time.py
+4
-4
No files found.
comment/views/auto_comment.py
View file @
78d16ff4
...
@@ -56,10 +56,9 @@ def auto_comment_user(card_info, after_day=False):
...
@@ -56,10 +56,9 @@ def auto_comment_user(card_info, after_day=False):
card_info
[
'all_follow_id'
])
==
0
and
len
(
card_info
[
'all_push_time'
])
==
0
)
or
(
card_info
[
'all_follow_id'
])
==
0
and
len
(
card_info
[
'all_push_time'
])
==
0
)
or
(
"all_follow_id"
not
in
card_info
and
"all_push_time"
not
in
card_info
and
card_info
[
"all_follow_id"
not
in
card_info
and
"all_push_time"
not
in
card_info
and
card_info
[
'type'
]
==
"get_write_answer_userinfo"
):
'type'
]
==
"get_write_answer_userinfo"
):
repeat_time
=
1
while
True
:
while
True
:
repeat_time
=
1
if
card_info
[
'type'
]
==
"get_write_answer_userinfo"
:
if
card_info
[
'type'
]
==
"get_write_answer_userinfo"
:
repeat_time
=
0
repeat_time
=
0
card_info
[
'have_comment_number'
]
=
0
card_info
[
'have_comment_number'
]
=
0
...
...
moment/views/process_time.py
View file @
78d16ff4
...
@@ -92,7 +92,7 @@ def get_one_six_days_random_time(frmt='%Y-%m-%d %H:%M:%S', num_days=0, action_ty
...
@@ -92,7 +92,7 @@ def get_one_six_days_random_time(frmt='%Y-%m-%d %H:%M:%S', num_days=0, action_ty
def
get_ten_last_days_random_time
(
num_days
=
None
,
frmt
=
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
content_level
=
0
,
def
get_ten_last_days_random_time
(
num_days
=
None
,
frmt
=
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
content_level
=
0
,
content_day_need_add_one_day
=
False
,
action_type
=
None
):
content_day_need_add_one_day
=
False
,
action_type
=
None
,
repeat_time
=
1
):
try
:
try
:
if
num_days
==
None
:
if
num_days
==
None
:
...
@@ -127,8 +127,8 @@ def get_ten_last_days_random_time(num_days=None, frmt='%Y-%m-%d %H:%M:%S', conte
...
@@ -127,8 +127,8 @@ def get_ten_last_days_random_time(num_days=None, frmt='%Y-%m-%d %H:%M:%S', conte
pass
pass
if
content_day_need_add_one_day
==
True
:
if
content_day_need_add_one_day
==
True
:
start_time
=
zeroday
+
datetime
.
timedelta
(
days
=
add_number
+
1
)
start_time
=
zeroday
+
datetime
.
timedelta
(
days
=
add_number
*
repeat_time
)
end_time
=
lastday
+
datetime
.
timedelta
(
days
=
add_number
+
1
)
end_time
=
lastday
+
datetime
.
timedelta
(
days
=
add_number
*
repeat_time
)
else
:
else
:
start_time
=
zeroday
+
datetime
.
timedelta
(
days
=
add_number
)
start_time
=
zeroday
+
datetime
.
timedelta
(
days
=
add_number
)
...
@@ -181,7 +181,7 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
...
@@ -181,7 +181,7 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
get_time
=
get_ten_last_days_random_time
(
num_days
=
num_days
,
content_level
=
content_level
,
get_time
=
get_ten_last_days_random_time
(
num_days
=
num_days
,
content_level
=
content_level
,
content_day_need_add_one_day
=
content_day_need_add_one_day
,
content_day_need_add_one_day
=
content_day_need_add_one_day
,
action_type
=
action_type
)
action_type
=
action_type
,
repeat_time
=
repeat_time
)
time_region
=
2
time_region
=
2
return
get_time
,
time_region
return
get_time
,
time_region
...
...
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