reject queue
parent
b91b482f36
commit
26c3217275
10
client.py
10
client.py
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue