Commit e56b5026 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Debug messages

parent 506433fe
...@@ -12,7 +12,7 @@ services: ...@@ -12,7 +12,7 @@ services:
- waitingTime=1000 - waitingTime=1000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/inputdistributor image: 129.7.98.3:5000/mogswitch/inputdistributor
input2: input2:
container_name: InputDistributor2 container_name: InputDistributor2
...@@ -25,7 +25,7 @@ services: ...@@ -25,7 +25,7 @@ services:
- waitingTime=1000 - waitingTime=1000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/inputdistributor image: 129.7.98.3:5000/mogswitch/inputdistributor
proxy: proxy:
container_name: ProxyTranscoder container_name: ProxyTranscoder
...@@ -36,7 +36,7 @@ services: ...@@ -36,7 +36,7 @@ services:
- multicastAddrPort=3000 - multicastAddrPort=3000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder image: 129.7.98.3:5000/mogswitch/proxytranscoder
privileged: true privileged: true
proxy2: proxy2:
...@@ -48,7 +48,7 @@ services: ...@@ -48,7 +48,7 @@ services:
- multicastAddrPort=3002 - multicastAddrPort=3002
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder image: 129.7.98.3:5000/mogswitch/proxytranscoder
privileged: true privileged: true
proxyOut: proxyOut:
...@@ -60,7 +60,7 @@ services: ...@@ -60,7 +60,7 @@ services:
- multicastAddrPort=6000 - multicastAddrPort=6000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder image: 129.7.98.3:5000/mogswitch/proxytranscoder
privileged: true privileged: true
switcher: switcher:
...@@ -81,7 +81,7 @@ services: ...@@ -81,7 +81,7 @@ services:
- waitingTime=1000 - waitingTime=1000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/videoswitcher image: 129.7.98.3:5000/mogswitch/videoswitcher
output: output:
container_name: OutputTranscoder container_name: OutputTranscoder
...@@ -94,5 +94,5 @@ services: ...@@ -94,5 +94,5 @@ services:
- videoHeight=100 - videoHeight=100
- OutIP=192.168.1.194 - OutIP=192.168.1.194
- OutPort=4000 - OutPort=4000
image: 145.100.133.241:5000/mogswitch/outputtranscoder image: 129.7.98.3:5000/mogswitch/outputtranscoder
privileged: true privileged: true
...@@ -12,7 +12,7 @@ services: ...@@ -12,7 +12,7 @@ services:
- waitingTime=1000 - waitingTime=1000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/inputdistributor image: 129.7.98.3:5000/mogswitch/inputdistributor
input2: input2:
container_name: InputDistributor2 container_name: InputDistributor2
...@@ -25,7 +25,7 @@ services: ...@@ -25,7 +25,7 @@ services:
- waitingTime=1000 - waitingTime=1000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/inputdistributor image: 129.7.98.3:5000/mogswitch/inputdistributor
proxy: proxy:
container_name: ProxyTranscoder container_name: ProxyTranscoder
...@@ -36,7 +36,7 @@ services: ...@@ -36,7 +36,7 @@ services:
- multicastAddrPort=3000 - multicastAddrPort=3000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder image: 129.7.98.3:5000/mogswitch/proxytranscoder
privileged: true privileged: true
proxy2: proxy2:
...@@ -48,7 +48,7 @@ services: ...@@ -48,7 +48,7 @@ services:
- multicastAddrPort=3002 - multicastAddrPort=3002
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder image: 129.7.98.3:5000/mogswitch/proxytranscoder
privileged: true privileged: true
proxyOut: proxyOut:
...@@ -60,7 +60,7 @@ services: ...@@ -60,7 +60,7 @@ services:
- multicastAddrPort=6000 - multicastAddrPort=6000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder image: 129.7.98.3:5000/mogswitch/proxytranscoder
privileged: true privileged: true
switcher: switcher:
...@@ -81,7 +81,7 @@ services: ...@@ -81,7 +81,7 @@ services:
- waitingTime=1000 - waitingTime=1000
- videoWidth=176 - videoWidth=176
- videoHeight=100 - videoHeight=100
image: 145.100.133.241:5000/mogswitch/videoswitcher image: 129.7.98.3:5000/mogswitch/videoswitcher
output: output:
container_name: OutputTranscoder container_name: OutputTranscoder
...@@ -94,5 +94,5 @@ services: ...@@ -94,5 +94,5 @@ services:
- videoHeight=100 - videoHeight=100
- OutIP=192.168.1.194 - OutIP=192.168.1.194
- OutPort=4000 - OutPort=4000
image: 145.100.133.241:5000/mogswitch/outputtranscoder image: 129.7.98.3:5000/mogswitch/outputtranscoder
privileged: true privileged: true
...@@ -9,6 +9,9 @@ import docker_kubernetes ...@@ -9,6 +9,9 @@ import docker_kubernetes
import docker_engine import docker_engine
import docker_swarm import docker_swarm
import control_agent import control_agent
import sys, argparse
from threading import Thread
from time import sleep
print sys.argv print sys.argv
if len(sys.argv) > 1: if len(sys.argv) > 1:
...@@ -23,6 +26,13 @@ channel.queue_declare(queue='deployer_queue') ...@@ -23,6 +26,13 @@ channel.queue_declare(queue='deployer_queue')
path = os.path.dirname(os.path.abspath(__file__)) + "/" path = os.path.dirname(os.path.abspath(__file__)) + "/"
def threaded_function(args):
while True:
#print "processing data events"
connection.process_data_events()
sleep(30)
def handleDelivery(message): def handleDelivery(message):
parsed_json = json.loads(message) parsed_json = json.loads(message)
params = parsed_json["parameters"] params = parsed_json["parameters"]
...@@ -82,6 +92,8 @@ def on_request(ch, method, props, body): ...@@ -82,6 +92,8 @@ def on_request(ch, method, props, body):
par["attributes"] = "null" par["attributes"] = "null"
response["parameters"].append(par) response["parameters"].append(par)
print "Response: %s " % response
ch.basic_publish(exchange='', ch.basic_publish(exchange='',
routing_key=props.reply_to, routing_key=props.reply_to,
properties=pika.BasicProperties(correlation_id = \ properties=pika.BasicProperties(correlation_id = \
...@@ -92,5 +104,10 @@ def on_request(ch, method, props, body): ...@@ -92,5 +104,10 @@ def on_request(ch, method, props, body):
channel.basic_qos(prefetch_count=1) channel.basic_qos(prefetch_count=1)
channel.basic_consume(on_request, queue='deployer_queue') channel.basic_consume(on_request, queue='deployer_queue')
thread = Thread(target = threaded_function, args = (1, ))
thread.start()
print(" [x] Awaiting RPC requests") print(" [x] Awaiting RPC requests")
channel.start_consuming() channel.start_consuming()
thread.stop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment