MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / cleanup_worker

Method cleanup_worker

shared.py:1931–1943  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1929 # Load image series dynamically from subdirectories
1930 self.image_series = {}
1931 for status in self.status_list:
1932 self.image_series[status] = []
1933 status_dir = os.path.join(self.statuspicdir, status)
1934 if not os.path.isdir(status_dir):
1935 os.makedirs(status_dir)
1936 logger.warning(f"Directory {status_dir} did not exist and was created.")
1937 logger.warning(f" {status} wil use the IDLE images till you add some images in the {status} folder")
1938
1939 for image_name in os.listdir(status_dir):
1940 if image_name.endswith('.bmp') and re.search(r'\d', image_name):
1941 image = self.load_image(os.path.join(status_dir, image_name), scale=img_scale)
1942 if image:
1943 self.image_series[status].append(image)
1944
1945 if not self.image_series:
1946 logger.error("No images loaded.")

Callers

nothing calls this directly

Calls 4

cleanup_old_hostsMethod · 0.80
infoMethod · 0.80
errorMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected