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
cdb46607
Commit
cdb46607
authored
Dec 25, 2019
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置
parent
7cb63038
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
irrigation.cpython-36.pyc
moment/views/__pycache__/irrigation.cpython-36.pyc
+0
-0
irrigation.py
moment/views/irrigation.py
+4
-0
No files found.
moment/views/__pycache__/irrigation.cpython-36.pyc
View file @
cdb46607
No preview for this file type
moment/views/irrigation.py
View file @
cdb46607
...
@@ -14,7 +14,10 @@ import logging
...
@@ -14,7 +14,10 @@ import logging
@bind
(
'vest/moment/vest_irrigation'
)
@bind
(
'vest/moment/vest_irrigation'
)
def
vest_irrigation
(
card_id
=
0
,
card_type
=
None
,
card_user_id
=
None
,
create_time
=
""
,
content_level
=
0
,
tag_names
=
[]):
def
vest_irrigation
(
card_id
=
0
,
card_type
=
None
,
card_user_id
=
None
,
create_time
=
""
,
content_level
=
0
,
tag_names
=
[]):
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
comment_msg_dict
=
{
comment_msg_dict
=
{
"card_id"
:
card_id
,
"card_id"
:
card_id
,
...
@@ -57,6 +60,7 @@ def vest_irrigation(card_id=0, card_type=None, card_user_id=None, create_time=""
...
@@ -57,6 +60,7 @@ 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
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
logging
.
error
(
"catch exception,err_msg:
%
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