Fix
Signed-off-by: Thomas Williams <thomas@ycwmwl.cymru>
This commit is contained in:
parent
847fbdbd0a
commit
cc0a27ff10
1 changed files with 13 additions and 9 deletions
|
@ -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('|')
|
||||||
|
|
Loading…
Reference in a new issue