diff --git a/sorteerhoed/central_management.py b/sorteerhoed/central_management.py index 9213dfa..14e30bc 100644 --- a/sorteerhoed/central_management.py +++ b/sorteerhoed/central_management.py @@ -355,6 +355,7 @@ class CentralManagement(): self.plotter.park() scan = threading.Thread(target=self.cleanDrawing, name='reset') scan.start() + self.server.statusPage.clearAssignment() def scanImage(self) -> str: """ diff --git a/sorteerhoed/webserver.py b/sorteerhoed/webserver.py index 4095b09..516954d 100644 --- a/sorteerhoed/webserver.py +++ b/sorteerhoed/webserver.py @@ -377,6 +377,16 @@ class StatusPage(): self.hit_created = None self.hit_opened = None self.hit_submitted = None + + def clearAssignment(self): + logger.info("Resetting hit assignment") + self.worker_id = None + self.ip = None + self.location = None + self.browser = None + self.os = None + self.resolution = None + self.hit_created = None def __setattr__(self, name, value): if name in self.__dict__ and self.__dict__[name] == value: