Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
ffm-baseline
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ML
ffm-baseline
Commits
8cee2e48
Commit
8cee2e48
authored
Dec 01, 2020
by
赵威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'offic' into 'master'
update datetime format See merge request
!77
parents
93ae2bf9
a0b5a028
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tag3_update_user_portrait_offline.py
eda/smart_rank/tag3_update_user_portrait_offline.py
+2
-2
No files found.
eda/smart_rank/tag3_update_user_portrait_offline.py
View file @
8cee2e48
...
@@ -327,7 +327,7 @@ def update_tag3_user_portrait(cl_id):
...
@@ -327,7 +327,7 @@ def update_tag3_user_portrait(cl_id):
def
consume_kafka
():
def
consume_kafka
():
start
=
datetime
.
datetime
.
now
()
start
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M"
)
sql
=
"select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
sql
=
"select distinct cl_id from kafka_tag3_log where log_time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
db
,
cursor
=
get_doris_prod
()
db
,
cursor
=
get_doris_prod
()
cursor
.
execute
(
sql
)
cursor
.
execute
(
sql
)
...
@@ -361,7 +361,7 @@ def consume_kafka():
...
@@ -361,7 +361,7 @@ def consume_kafka():
# result2.foreach(print)
# result2.foreach(print)
# result2.collect()
# result2.collect()
end
=
datetime
.
datetime
.
now
()
end
=
datetime
.
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M"
)
msg_dict
=
{
"start"
:
str
(
start
),
"end"
:
str
(
end
),
"device_number"
:
len
(
device_ids_lst
)}
msg_dict
=
{
"start"
:
str
(
start
),
"end"
:
str
(
end
),
"device_number"
:
len
(
device_ids_lst
)}
msg_res
=
""
msg_res
=
""
for
(
k
,
v
)
in
msg_dict
.
items
():
for
(
k
,
v
)
in
msg_dict
.
items
():
...
...
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