mirror of
https://github.com/FAUSheppy/skillbird
synced 2025-12-06 14:51:36 +01:00
Merge branch 'master' of gitlab.com:Sheppy_/skillbird
This commit is contained in:
@@ -12,6 +12,7 @@ def listen():
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
s.bind((TCP_IP, TCP_PORT))
|
||||
s.listen(5)
|
||||
print("TCP listener on {}:{}".format(TCP_IP, TCP_PORT))
|
||||
while True:
|
||||
conn, addr = s.accept();
|
||||
Thread(target=t_listen,args=(conn,)).start();
|
||||
|
||||
@@ -6,6 +6,7 @@ import argparse
|
||||
import StorrageBackend
|
||||
import NetworkListener
|
||||
import httpAPI
|
||||
from threading import Thread
|
||||
|
||||
parser = argparse.ArgumentParser(description='Insurgency rating python backend server')
|
||||
parser.add_argument('files', metavar='FILE', type=str, nargs='+',\
|
||||
@@ -33,12 +34,9 @@ if __name__ == "__main__":
|
||||
nofollow=args.nofollow, \
|
||||
oneThread=args.oneThread, \
|
||||
cacheFile=args.cacheFile)
|
||||
if args.oneThread:
|
||||
for l in StorrageBackend.dumpRatings().split("\n"):
|
||||
print(l)
|
||||
if not args.parse_only:
|
||||
print("Starting network-listener")
|
||||
httpAPI.app.run()
|
||||
print("Starting network-listener(s)")
|
||||
Thread(target=httpAPI.app.run).start()
|
||||
NetworkListener.listen()
|
||||
else:
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user