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
87b1e5b7
Commit
87b1e5b7
authored
Dec 26, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto_vest
parent
e0fd699b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
auto_follow.py
follow/views/auto_follow.py
+0
-5
process_time.py
moment/views/process_time.py
+0
-20
No files found.
follow/views/auto_follow.py
View file @
87b1e5b7
...
...
@@ -79,12 +79,7 @@ def auto_follow_user(card_info, after_day=False):
if
time_region
==
3
:
break
repeat_time
+=
1
logging
.
info
(
"get have_get_after__time:
%
s"
%
card_info
)
else
:
# 代表还有push好的时间没有下发完成 需要继续使用这些
logging
.
info
(
"get-----follow----card_info:
%
s"
%
card_info
)
card_info
[
"have_pust_num"
]
=
card_info
[
"have_pust_num"
]
+
1
current_user_id
=
card_info
[
"current_user_id"
]
card_info
[
"all_follow_id"
]
.
remove
(
current_user_id
)
...
...
moment/views/process_time.py
View file @
87b1e5b7
...
...
@@ -158,7 +158,6 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
num_days
+=
repeat_time
content_day_need_add_one_day
=
True
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
# 创建时间切换成分钟数便于比较
# mins = divmod(num, min)[0]
##根据转换后的分钟数进行比较
...
...
@@ -169,25 +168,17 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
return
get_time
,
time_region
elif
num_days
>=
1
and
num_days
<=
6
:
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
get_time
=
get_one_six_days_random_time
(
content_level
=
content_level
,
num_days
=
num_days
,
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
:
logging
.
info
(
"get-----------------num_days:
%
s"
%
num_days
)
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
,
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
:
...
...
@@ -210,46 +201,35 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
##获取创建时间和当前时间的相差秒数
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
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
:
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
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
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
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
2
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
)
logging
.
info
(
"get-----------------get_time:
%
s"
%
get_time
)
return
get_time
,
4
...
...
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