Hi,
I have below function and want to spawn it async
I am using watchdof file created.
def LookUpDb(file):
print(“ASYNC”)
print(“dosya kontrol ediliyor”, file)
_is_ready = False
while (_is_ready == False):
size = os.path.getsize(file)
sleep(0.009)
if size == os.path.getsize(file):
_is_ready = True
print("PROcessing : " , file)
_chip = cv2.imread(file)
img, points = model.get_input(face_chip)
feature = model.get_feature(img)
os.rename(file, file + "processed_")
print("FINISHED _ _ ASYNC")
return 1
and I am calling the func:
res = p.apply_async(testPool , (file,))
but its stucking after one file…
any idea ?