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
c11c68b7
Commit
c11c68b7
authored
Dec 26, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto_vest
parent
d077aa62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
auto_click.py
click/views/auto_click.py
+0
-1
process_time.py
moment/views/process_time.py
+10
-0
No files found.
click/views/auto_click.py
View file @
c11c68b7
...
...
@@ -77,7 +77,6 @@ def auto_click_user(card_info, after_day=False):
repeat_time
+=
1
else
:
# 代表还有push好的时间没有下发完成 需要继续使用这些
current_user_id
=
card_info
[
"current_user_id"
]
card_info
[
"all_follow_id"
]
.
remove
(
current_user_id
)
current_push_time
=
card_info
[
'current_push_time'
]
...
...
moment/views/process_time.py
View file @
c11c68b7
...
...
@@ -207,6 +207,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
num
=
(
now
-
createt
)
.
total_seconds
()
num_days
=
(
now
-
createt
)
.
days
content_day_need_add_one_day
=
False
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
if
after_day
:
num_days
+=
repeat_time
content_day_need_add_one_day
=
True
...
...
@@ -216,6 +218,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return
get_time
,
0
elif
num_days
==
1
:
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
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
)
...
...
@@ -223,6 +227,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return
get_time
,
1
elif
num_days
>
1
and
num_days
<=
15
:
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
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
)
...
...
@@ -231,6 +237,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
elif
num_days
>
15
and
num_days
<=
365
:
##需要删掉kafka的数据不再进行下发
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
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
)
...
...
@@ -238,6 +246,8 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
else
:
return
[],
3
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
except
:
logger
.
error
(
"catch exception,err_log:
%
s"
%
traceback
.
format_exc
())
...
...
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