Signed-off-by: Thomas Williams <thomas@ycwmwl.cymru>
This commit is contained in:
Thomas Williams 2024-08-20 19:45:31 +01:00
parent 847fbdbd0a
commit cc0a27ff10

View file

@ -55,13 +55,17 @@ def main():
if dataBuffer: if dataBuffer:
data = dataBuffer.pop(0) data = dataBuffer.pop(0)
if config.loggingMode == 'rabbitmq':
rabbitmq.publish(f"{data}") rabbitmq.publish(f"{data}")
else: else:
while not (stopEvent.is_set() and not failureEvent.is_set()):
time.sleep(1)
if dataBuffer:
data = dataBuffer.pop(0)
hostname = socket.gethostname() hostname = socket.gethostname()
ipAddress = socket.gethostbyname(hostname) ipAddress = socket.gethostbyname(hostname)
data = data.split('|') data = data.split('|')