Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Data Quality Checking Subscriber
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ajil.k
Data Quality Checking Subscriber
Commits
6e498d0a
Commit
6e498d0a
authored
Feb 21, 2023
by
ajil.k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added
parent
7372426d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
conf/application.conf
conf/application.conf
+1
-0
scripts/constants/application_config.py
scripts/constants/application_config.py
+1
-0
scripts/core/handlers/handle_subcribed_data.py
scripts/core/handlers/handle_subcribed_data.py
+2
-1
No files found.
conf/application.conf
View file @
6e498d0a
...
@@ -5,6 +5,7 @@ port_no = 5000
...
@@ -5,6 +5,7 @@ port_no = 5000
broker
=
192
.
168
.
0
.
220
broker
=
192
.
168
.
0
.
220
port
=
1883
port
=
1883
time_out
=
60
time_out
=
60
topic
=
Website
/
#
[
redis_connection
]
[
redis_connection
]
host
=
127
.
0
.
0
.
1
host
=
127
.
0
.
0
.
1
...
...
scripts/constants/application_config.py
View file @
6e498d0a
...
@@ -9,6 +9,7 @@ try:
...
@@ -9,6 +9,7 @@ try:
broker
=
config
.
get
(
"MQTT_Connection"
,
"broker"
)
broker
=
config
.
get
(
"MQTT_Connection"
,
"broker"
)
mqtt_port
=
config
.
get
(
"MQTT_Connection"
,
"port"
)
mqtt_port
=
config
.
get
(
"MQTT_Connection"
,
"port"
)
time_out
=
config
.
get
(
"MQTT_Connection"
,
"time_out"
)
time_out
=
config
.
get
(
"MQTT_Connection"
,
"time_out"
)
topic
=
config
.
get
(
"MQTT_Connection"
,
"topic"
)
host
=
config
.
get
(
"redis_connection"
,
"host"
)
host
=
config
.
get
(
"redis_connection"
,
"host"
)
redis_port
=
config
.
get
(
"redis_connection"
,
"redis_port"
)
redis_port
=
config
.
get
(
"redis_connection"
,
"redis_port"
)
...
...
scripts/core/handlers/handle_subcribed_data.py
View file @
6e498d0a
import
json
import
json
from
scripts.constants.application_config
import
topic
from
scripts.constants.mqtt_connection
import
mqtt_client_connection
from
scripts.constants.mqtt_connection
import
mqtt_client_connection
from
scripts.core.handlers.store_in_redis
import
store_data_in_db
from
scripts.core.handlers.store_in_redis
import
store_data_in_db
from
scripts.logging.logger
import
logger
from
scripts.logging.logger
import
logger
...
@@ -16,7 +18,6 @@ def start_subscribing():
...
@@ -16,7 +18,6 @@ def start_subscribing():
# MQTT client for subscribing
# MQTT client for subscribing
mqtt_client
=
mqtt_client_connection
()
mqtt_client
=
mqtt_client_connection
()
print
(
"Waiting for messages"
)
print
(
"Waiting for messages"
)
topic
=
"Website/#"
mqtt_client
.
subscribe
(
topic
)
mqtt_client
.
subscribe
(
topic
)
mqtt_client
.
on_message
=
on_message
mqtt_client
.
on_message
=
on_message
mqtt_client
.
loop_forever
()
mqtt_client
.
loop_forever
()
...
...
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