-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
23 lines (16 loc) · 685 Bytes
/
Copy pathmain.py
File metadata and controls
23 lines (16 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from Flask import app_flask
from MySQL import insert_data_on_my_sql
from Neo4j import insert_data_to_neo4j
if __name__ == '__main__':
# Creating Table Product on MySQL with 50 books-products
insert_data_on_my_sql()
# Creating users and friendship relationships
insert_data_to_neo4j()
# delete existing topics __consumer_offsets, products-topic, users-topic
os.system("sudo -S docker exec kafka tmp/deleteTopic.sh")
# Running on terminal these scripts
os.system("gnome-terminal -- python ERProducer.py")
os.system("gnome-terminal -- python GraphProducer.py")
os.system("gnome-terminal -- python Consumer.py")
app_flask.run()