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
5c0494e4
Commit
5c0494e4
authored
Dec 26, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修日志
parent
31770047
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
24 deletions
+0
-24
auto_click.py
click/views/auto_click.py
+0
-1
auto_comment.py
comment/views/auto_comment.py
+0
-1
auto_follow.py
follow/views/auto_follow.py
+0
-1
consum.py
moment/views/consum.py
+0
-1
irrigation.py
moment/views/irrigation.py
+0
-5
process_time.py
moment/views/process_time.py
+0
-15
No files found.
click/views/auto_click.py
View file @
5c0494e4
...
@@ -61,7 +61,6 @@ def auto_click_user(card_info, after_day=False):
...
@@ -61,7 +61,6 @@ def auto_click_user(card_info, after_day=False):
after_day
=
after_day
,
after_day
=
after_day
,
card_info
=
card_info
,
card_info
=
card_info
,
repeat_time
=
repeat_time
)
repeat_time
=
repeat_time
)
logging
.
info
(
"get get_time and time_region:
%
s"
%
get_time
)
if
len
(
get_time
)
>
0
and
time_region
!=
3
:
if
len
(
get_time
)
>
0
and
time_region
!=
3
:
###拿到下发时间后根据下发的时间个数去拿对应个数的马甲账号
###拿到下发时间后根据下发的时间个数去拿对应个数的马甲账号
...
...
comment/views/auto_comment.py
View file @
5c0494e4
...
@@ -69,7 +69,6 @@ def auto_comment_user(card_info, after_day=False):
...
@@ -69,7 +69,6 @@ def auto_comment_user(card_info, after_day=False):
after_day
=
after_day
,
after_day
=
after_day
,
card_info
=
card_info
,
card_info
=
card_info
,
repeat_time
=
repeat_time
)
repeat_time
=
repeat_time
)
logging
.
info
(
"get get_time and time_region:
%
s"
%
get_time
)
if
len
(
get_time
)
>
0
and
time_region
!=
3
:
if
len
(
get_time
)
>
0
and
time_region
!=
3
:
###拿到下发时间后根据下发的时间个数去拿对应个数的马甲账号
###拿到下发时间后根据下发的时间个数去拿对应个数的马甲账号
all_content
=
get_vest_userid_and_comment
(
need_comment_num
=
len
(
get_time
),
all_content
=
get_vest_userid_and_comment
(
need_comment_num
=
len
(
get_time
),
...
...
follow/views/auto_follow.py
View file @
5c0494e4
...
@@ -61,7 +61,6 @@ def auto_follow_user(card_info, after_day=False):
...
@@ -61,7 +61,6 @@ def auto_follow_user(card_info, after_day=False):
after_day
=
after_day
,
after_day
=
after_day
,
card_info
=
card_info
,
card_info
=
card_info
,
repeat_time
=
repeat_time
)
repeat_time
=
repeat_time
)
logging
.
info
(
"get get_time and time_region:
%
s"
%
get_time
)
if
len
(
get_time
)
>
0
and
time_region
!=
3
:
if
len
(
get_time
)
>
0
and
time_region
!=
3
:
...
...
moment/views/consum.py
View file @
5c0494e4
...
@@ -41,7 +41,6 @@ def kafka_consum(topic_name=None):
...
@@ -41,7 +41,6 @@ def kafka_consum(topic_name=None):
nowtime
=
datetime
.
datetime
.
now
()
nowtime
=
datetime
.
datetime
.
now
()
push_time_date
=
datetime
.
datetime
.
strptime
(
current_push_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
push_time_date
=
datetime
.
datetime
.
strptime
(
current_push_time
,
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
if
push_time_date
<=
nowtime
:
# push_time已经到时间了 需要去下发
if
push_time_date
<=
nowtime
:
# push_time已经到时间了 需要去下发
logging
.
info
(
"get push_time_date:
%
s"
%
push_time_date
)
# 判断如果当前的push_time 和当前的创建时间一样 需要给push_time下发真的push时间
# 判断如果当前的push_time 和当前的创建时间一样 需要给push_time下发真的push时间
if
current_push_time
==
create_time
:
if
current_push_time
==
create_time
:
if
card_info
[
'action_type'
]
==
"comment"
:
if
card_info
[
'action_type'
]
==
"comment"
:
...
...
moment/views/irrigation.py
View file @
5c0494e4
...
@@ -17,13 +17,9 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
...
@@ -17,13 +17,9 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
try
:
try
:
producer
=
KafkaProducer
(
bootstrap_servers
=
[
settings
.
KAFKA_BROKER_LIST
])
producer
=
KafkaProducer
(
bootstrap_servers
=
[
settings
.
KAFKA_BROKER_LIST
])
logging
.
info
(
"------------------------"
)
topic
=
settings
.
KAFKA_TOPIC_NAME
topic
=
settings
.
KAFKA_TOPIC_NAME
tag_list
=
[
"瘦脸针kyc"
,
"双眼皮kyc"
,
"水光针kyc"
,
"玻尿酸kyc"
,
"吸脂kyc"
,
"祛痘kyc"
,
"鼻综合kyc"
,
"光子嫩肤kyc"
,
"没有想法kyc"
,
tag_list
=
[
"瘦脸针kyc"
,
"双眼皮kyc"
,
"水光针kyc"
,
"玻尿酸kyc"
,
"吸脂kyc"
,
"祛痘kyc"
,
"鼻综合kyc"
,
"光子嫩肤kyc"
,
"没有想法kyc"
,
"牙齿kyc"
,
"抗衰紧致kyc"
,
"胸部kyc"
,
"果酸换肤kyc"
,
"祛斑kyc"
,
"美白针kyc"
,
"瘦腿针kyc"
]
"牙齿kyc"
,
"抗衰紧致kyc"
,
"胸部kyc"
,
"果酸换肤kyc"
,
"祛斑kyc"
,
"美白针kyc"
,
"瘦腿针kyc"
]
flag
=
False
flag
=
False
if
len
(
tag_names
)
>
0
:
if
len
(
tag_names
)
>
0
:
for
i
in
tag_names
:
for
i
in
tag_names
:
...
@@ -73,7 +69,6 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
...
@@ -73,7 +69,6 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
producer
.
send
(
topic
,
json
.
dumps
(
click_msg_dict
)
.
encode
())
producer
.
send
(
topic
,
json
.
dumps
(
click_msg_dict
)
.
encode
())
producer
.
close
()
producer
.
close
()
logging
.
info
(
"------------------------"
)
except
:
except
:
logging_exception
()
logging_exception
()
...
...
moment/views/process_time.py
View file @
5c0494e4
...
@@ -157,19 +157,15 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
...
@@ -157,19 +157,15 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
num_days
+=
repeat_time
num_days
+=
repeat_time
content_day_need_add_one_day
=
True
content_day_need_add_one_day
=
True
# 创建时间切换成分钟数便于比较
# 创建时间切换成分钟数便于比较
logging
.
info
(
"get num_days:
%
s"
%
num_days
)
# mins = divmod(num, min)[0]
# mins = divmod(num, min)[0]
##根据转换后的分钟数进行比较
##根据转换后的分钟数进行比较
##转化成分数后进行一层一层的比较
##转化成分数后进行一层一层的比较
if
num_days
==
0
:
if
num_days
==
0
:
logging
.
info
(
"-------------当天----------------------------"
)
get_time
=
randomDate
(
create_time
=
createt
,
action_type
=
action_type
)
get_time
=
randomDate
(
create_time
=
createt
,
action_type
=
action_type
)
time_region
=
0
time_region
=
0
return
get_time
,
time_region
return
get_time
,
time_region
elif
num_days
>=
1
and
num_days
<=
6
:
elif
num_days
>=
1
and
num_days
<=
6
:
logging
.
info
(
"-------------1-6天的----------------------------"
)
get_time
=
get_one_six_days_random_time
(
content_level
=
content_level
,
num_days
=
num_days
,
get_time
=
get_one_six_days_random_time
(
content_level
=
content_level
,
num_days
=
num_days
,
action_type
=
action_type
,
action_type
=
action_type
,
content_day_need_add_one_day
=
content_day_need_add_one_day
)
content_day_need_add_one_day
=
content_day_need_add_one_day
)
...
@@ -177,8 +173,6 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
...
@@ -177,8 +173,6 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
return
get_time
,
time_region
return
get_time
,
time_region
elif
num_days
>
6
and
num_days
<=
365
:
elif
num_days
>
6
and
num_days
<=
365
:
logging
.
info
(
"-------------6天后的---------------------------"
)
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
)
time_region
=
2
time_region
=
2
...
@@ -186,7 +180,6 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
...
@@ -186,7 +180,6 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
else
:
else
:
##需要删掉kafka的数据不再进行下发
##需要删掉kafka的数据不再进行下发
logging
.
info
(
"-------------所有下发结束---------------------------"
)
return
[],
3
return
[],
3
except
:
except
:
...
@@ -215,7 +208,6 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
...
@@ -215,7 +208,6 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
##转化成分数后进行一层一层的比较
##转化成分数后进行一层一层的比较
if
num_days
==
0
:
if
num_days
==
0
:
logging
.
info
(
"-------------当天----------------------------"
)
get_time
=
randomDate
(
create_time
=
createt
,
action_type
=
action_type
)
get_time
=
randomDate
(
create_time
=
createt
,
action_type
=
action_type
)
logging
.
info
(
"拿到当天的时间 get get_time:
%
s"
%
get_time
)
logging
.
info
(
"拿到当天的时间 get get_time:
%
s"
%
get_time
)
...
@@ -226,14 +218,12 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
...
@@ -226,14 +218,12 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
content_level
=
content_level
,
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
)
logging
.
info
(
"1天的 get get_time:
%
s"
%
get_time
)
return
get_time
,
1
return
get_time
,
1
elif
num_days
>
1
and
num_days
<=
15
:
elif
num_days
>
1
and
num_days
<=
15
:
get_time
=
get_one_six_days_random_time
(
num_days
=
num_days
,
action_type
=
action_type
,
get_time
=
get_one_six_days_random_time
(
num_days
=
num_days
,
action_type
=
action_type
,
content_level
=
content_level
,
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
)
logging
.
info
(
"2-15天后的的时间 get get_time:
%
s"
%
get_time
)
return
get_time
,
2
return
get_time
,
2
...
@@ -242,12 +232,9 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
...
@@ -242,12 +232,9 @@ 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
,
get_time
=
get_ten_last_days_random_time
(
num_days
=
num_days
,
action_type
=
action_type
,
content_level
=
content_level
,
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
)
logging
.
info
(
"拿到15天后的时间 get get_time:
%
s"
%
get_time
)
return
get_time
,
4
return
get_time
,
4
else
:
else
:
logging
.
info
(
"-------------所有下发结束---------------------------"
)
return
[],
3
return
[],
3
except
:
except
:
...
@@ -323,8 +310,6 @@ def get_vest_userid_and_comment(need_comment_num=0, tag_names=[], card_id=0):
...
@@ -323,8 +310,6 @@ def get_vest_userid_and_comment(need_comment_num=0, tag_names=[], card_id=0):
else
:
else
:
content
=
None
content
=
None
logging
.
info
(
"get content:
%
s"
%
content
)
return
content
return
content
except
:
except
:
...
...
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