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
ff7e64c8
Commit
ff7e64c8
authored
Dec 25, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add log
parent
3d3d2830
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
13 deletions
+10
-13
process_time.py
moment/views/process_time.py
+8
-11
settings.cpython-36.pyc
vest/__pycache__/settings.cpython-36.pyc
+0
-0
urls.cpython-36.pyc
vest/__pycache__/urls.cpython-36.pyc
+0
-0
settings.py
vest/settings.py
+2
-2
No files found.
moment/views/process_time.py
View file @
ff7e64c8
...
...
@@ -162,13 +162,14 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
##根据转换后的分钟数进行比较
##转化成分数后进行一层一层的比较
if
num_days
==
0
:
print
(
"当天
"
)
logging
.
info
(
"-------------当天----------------------------
"
)
get_time
=
randomDate
(
create_time
=
createt
,
action_type
=
action_type
)
time_region
=
0
return
get_time
,
time_region
elif
num_days
>=
1
and
num_days
<=
6
:
print
(
"1-6天的"
)
logging
.
info
(
"-------------1-6天的----------------------------"
)
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
)
...
...
@@ -176,7 +177,8 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
return
get_time
,
time_region
elif
num_days
>
6
and
num_days
<=
365
:
print
(
"6天后的"
)
logging
.
info
(
"-------------6天后的---------------------------"
)
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
)
time_region
=
2
...
...
@@ -184,7 +186,7 @@ def get_content_time_by_create_time(create_time="", content_level=0, action_type
else
:
##需要删掉kafka的数据不再进行下发
print
(
"所有下发结束
"
)
logging
.
info
(
"-------------所有下发结束---------------------------
"
)
return
[],
3
except
:
...
...
@@ -213,15 +215,13 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
##转化成分数后进行一层一层的比较
if
num_days
==
0
:
print
(
"当天
"
)
logging
.
info
(
"-------------当天----------------------------
"
)
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
:
print
(
"1天的"
)
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
)
...
...
@@ -230,7 +230,6 @@ 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
:
print
(
"2-15天后的"
)
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
)
...
...
@@ -240,8 +239,6 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
elif
num_days
>
15
and
num_days
<=
365
:
##需要删掉kafka的数据不再进行下发
print
(
"15天后的"
)
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
)
...
...
@@ -250,7 +247,7 @@ def get_click_follow_time_by_create_time(create_time="", content_level=0, action
return
get_time
,
4
else
:
print
(
"所有下发结束
"
)
logging
.
info
(
"-------------所有下发结束---------------------------
"
)
return
[],
3
except
:
...
...
vest/__pycache__/settings.cpython-36.pyc
View file @
ff7e64c8
No preview for this file type
vest/__pycache__/urls.cpython-36.pyc
View file @
ff7e64c8
No preview for this file type
vest/settings.py
View file @
ff7e64c8
...
...
@@ -84,8 +84,8 @@ DATABASES = {
'NAME'
:
'mimas_test'
,
'USER'
:
'work'
,
'PASSWORD'
:
'Gengmei1'
,
'HOST'
:
'
mysql-service
'
,
'PORT'
:
'
3306
'
,
'HOST'
:
'
bj-cdb-6slgqwlc.sql.tencentcdb.com
'
,
'PORT'
:
'
62120
'
,
'OPTIONS'
:
{
"init_command"
:
"SET foreign_key_checks = 0;"
,
"charset"
:
"utf8mb4"
,
# 为了支持emoji表情
...
...
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