From ad6a04ce6ff8fde0deb92868cc8e27aaa451ab79 Mon Sep 17 00:00:00 2001
From: Alfred Ashur Oshana <alfredashur.oshana@stud.h-da.de>
Date: Mon, 15 Jul 2024 12:03:05 +0200
Subject: [PATCH] fix: pi_id instead cube id

---
 pilab/events/reservation.py | 2 +-
 setup.py                    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pilab/events/reservation.py b/pilab/events/reservation.py
index 1b253dd..2933465 100644
--- a/pilab/events/reservation.py
+++ b/pilab/events/reservation.py
@@ -337,7 +337,7 @@ def restart_reservation_consumer(ids: List[int], callback: Callable = None):
     if not res_thread:
         res_thread = ReservationConsumer(pis=ids, callback=res_event_callback)
         res_thread.start()
-    elif Counter(ids) != Counter(res_thread.cubes):
+    elif Counter(ids) != Counter(res_thread.pis):
         res_thread.stop()
         res_thread.join()
         res_thread = ReservationConsumer(pis=ids, callback=res_event_callback)
diff --git a/setup.py b/setup.py
index d593686..9ee69f8 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
 
 setup(
     name='pilab',
-    version='4.2.1',
+    version='4.2.2',
     description='Shared-Libs for the pi-lab microservices',
     url='https://code.fbi.h-da.de/api/v4/projects/27896/packages/pypi/pilab',
     author='Max Reinheimer',
-- 
GitLab