Skip to content

Commit c7cb6ef

Browse files
committed
refine example
1 parent 962b746 commit c7cb6ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/consumer_group_examples/sync_data_to_splunk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
class SyncData(ConsumerProcessorBase):
2424
"""
25-
this consumer will keep monitor with k-v fields. like {"content": "error"}
25+
this consumer will forward logs to Splunk.
2626
"""
2727
def __init__(self, splunk_setting=None):
2828
"""
@@ -141,7 +141,7 @@ def get_monitor_option():
141141
data_fetch_interval=data_fetch_interval)
142142

143143
# monitor options
144-
keywords = {
144+
settings = {
145145
"host": "10.1.2.3",
146146
"port": 80,
147147
"token": "a023nsdu123123123",
@@ -153,14 +153,14 @@ def get_monitor_option():
153153
"source": "", # optional, source
154154
}
155155

156-
return option, keywords
156+
return option, settings
157157

158158

159159
def main():
160-
option, keywords = get_monitor_option()
160+
option, settings = get_monitor_option()
161161

162162
logger.info("*** start to consume data...")
163-
worker = ConsumerWorker(SyncData, option, args=(keywords,) )
163+
worker = ConsumerWorker(SyncData, option, args=(settings,) )
164164
worker.start()
165165

166166
try:

0 commit comments

Comments
 (0)