mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-12-13 05:26:43 +00:00
all in one
This commit is contained in:
9
main.py
9
main.py
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user