init
This commit is contained in:
14
collector/helper.py
Normal file
14
collector/helper.py
Normal 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))
|
||||
Reference in New Issue
Block a user