This commit is contained in:
ducoterra
2020-04-05 14:15:31 -04:00
commit bcaf5144fb
7 changed files with 173 additions and 0 deletions

14
collector/helper.py Normal file
View File

@@ -0,0 +1,14 @@
import functools
import threading
def thread(func, after, *args, **kwargs):
func = functools.partial(func, *args, **kwargs)
call = lambda after, func: after(func())
t = threading.Thread(
target = call,
args = (after, func)
)
t.start()
def get_missing(required, provided):
return list(filter(lambda item: item not in provided, required))