1
0
mirror of https://github.com/newnius/YAO-agent.git synced 2025-06-06 21:31:55 +00:00

all in one

This commit is contained in:
Newnius 2019-12-26 16:47:04 +08:00
parent 0cd7087ec2
commit c4d791fe03

View File

@ -1,5 +1,6 @@
import os
import threading
from threading import Thread
from threading import Lock
import time
import subprocess
import json
@ -21,7 +22,7 @@ KafkaBrokers = os.getenv('KafkaBrokers', 'localhost:9092').split(',')
PORT_NUMBER = 8000
lock = threading.Lock()
lock = Lock()
pending_tasks = {}
@ -306,8 +307,8 @@ def listen():
def main():
t1 = threading.Thread(target=report())
t2 = threading.Thread(target=listen())
t1 = Thread(target=report())
t2 = Thread(target=listen())
t1.start()
t2.start()
print("started")