Simplify get watched process. Only get watched for syncing libraries

Signed-off-by: Luis Garcia <git@luigi311.com>
This commit is contained in:
Luis Garcia
2024-10-27 13:43:09 -06:00
parent 8428be9dda
commit bc09c873e9
5 changed files with 185 additions and 155 deletions

View File

@@ -92,6 +92,18 @@ def search_mapping(dictionary: dict, key_value: str):
else:
return None
# Return list of objects that exist in both lists including mappings
def match_list(list1, list2, list_mapping=None):
output = []
for element in list1:
if element in list2:
output.append(element)
elif list_mapping:
element_other = search_mapping(list_mapping, element)
if element_other in list2:
output.append(element)
return output
def future_thread_executor(
args: list, threads: int = None, override_threads: bool = False