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
5f40f1c5
Commit
5f40f1c5
authored
Dec 26, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto_vest
parent
5cfa3e37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
auto_comment.py
comment/views/auto_comment.py
+1
-2
process_time.py
moment/views/process_time.py
+10
-4
No files found.
comment/views/auto_comment.py
View file @
5f40f1c5
...
...
@@ -56,13 +56,12 @@ def auto_comment_user(card_info, after_day=False):
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
[
'type'
]
==
"get_write_answer_userinfo"
):
repeat_time
=
1
while
True
:
if
card_info
[
'type'
]
==
"get_write_answer_userinfo"
:
repeat_time
=
0
card_info
[
'have_comment_number'
]
=
0
get_time
,
time_region
=
get_content_time_by_create_time
(
create_time
,
content_level
,
action_type
=
"comment"
,
after_day
=
after_day
,
...
...
moment/views/process_time.py
View file @
5f40f1c5
...
...
@@ -174,6 +174,8 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
action_type
=
action_type
,
content_day_need_add_one_day
=
content_day_need_add_one_day
)
time_region
=
1
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
time_region
elif
num_days
>
6
and
num_days
<=
365
:
...
...
@@ -183,12 +185,13 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
content_day_need_add_one_day
=
content_day_need_add_one_day
,
action_type
=
action_type
,
repeat_time
=
repeat_time
)
time_region
=
2
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
time_region
else
:
##需要删掉kafka的数据不再进行下发
return
[],
3
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
except
:
logger
.
error
(
"catch exception,err_log:
%
s"
%
traceback
.
format_exc
())
...
...
@@ -214,6 +217,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
if
num_days
==
0
:
get_time
=
randomDate
(
create_time
=
createt
,
action_type
=
action_type
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
0
elif
num_days
==
1
:
...
...
@@ -222,6 +227,7 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
get_time
=
get_one_six_days_random_time
(
num_days
=
num_days
,
action_type
=
action_type
,
content_level
=
content_level
,
content_day_need_add_one_day
=
content_day_need_add_one_day
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
1
...
...
@@ -231,6 +237,7 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
get_time
=
get_one_six_days_random_time
(
num_days
=
num_days
,
action_type
=
action_type
,
content_level
=
content_level
,
content_day_need_add_one_day
=
content_day_need_add_one_day
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
2
...
...
@@ -241,13 +248,12 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
get_time
=
get_ten_last_days_random_time
(
num_days
=
num_days
,
action_type
=
action_type
,
content_level
=
content_level
,
content_day_need_add_one_day
=
content_day_need_add_one_day
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
4
else
:
return
[],
3
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
except
:
logger
.
error
(
"catch exception,err_log:
%
s"
%
traceback
.
format_exc
())
return
[],
5
...
...
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