mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-06-07 13:51:56 +00:00
all in one
This commit is contained in:
parent
0cd7087ec2
commit
c4d791fe03
9
main.py
9
main.py
@ -1,5 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import threading
|
from threading import Thread
|
||||||
|
from threading import Lock
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
import json
|
import json
|
||||||
@ -21,7 +22,7 @@ KafkaBrokers = os.getenv('KafkaBrokers', 'localhost:9092').split(',')
|
|||||||
|
|
||||||
PORT_NUMBER = 8000
|
PORT_NUMBER = 8000
|
||||||
|
|
||||||
lock = threading.Lock()
|
lock = Lock()
|
||||||
pending_tasks = {}
|
pending_tasks = {}
|
||||||
|
|
||||||
|
|
||||||
@ -306,8 +307,8 @@ def listen():
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
t1 = threading.Thread(target=report())
|
t1 = Thread(target=report())
|
||||||
t2 = threading.Thread(target=listen())
|
t2 = Thread(target=listen())
|
||||||
t1.start()
|
t1.start()
|
||||||
t2.start()
|
t2.start()
|
||||||
print("started")
|
print("started")
|
||||||
|
Loading…
Reference in New Issue
Block a user