reject queue

master
Paul Walko 2018-04-26 12:24:02 +00:00
parent b91b482f36
commit 26c3217275
1 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,10 @@ def my_ip():
def process_response(response): def process_response(response):
"""Process response from serve & update GUI """Process response from serve & update GUI
""" """
id = response[0]
time = response[1]
# Update GUI with color # Update GUI with color
# TODO # TODO
color = 'red' color = 'red'
@ -35,6 +39,11 @@ def process_response(response):
# TODO # TODO
reject = False reject = False
checkpoint("Drink rejected? \'{}\'".format(reject)) checkpoint("Drink rejected? \'{}\'".format(reject))
if reject:
channel.basic_publish(exchange=rmq_params['exchange'],
routing_key=rmq_params['order_queue'],
body=str(id))
return return
@ -85,6 +94,7 @@ def main():
# TODO # TODO
print('Continuously listen for RFID ids') print('Continuously listen for RFID ids')
# TODO # TODO
input()
rfid_id = '123456' rfid_id = '123456'
order_data = {'id': rfid_id, 'ip': socket_host, 'port': socket_port, order_data = {'id': rfid_id, 'ip': socket_host, 'port': socket_port,