Update 'Attendence/attendence.py'
This commit is contained in:
+11
-10
@@ -539,22 +539,23 @@ def register():
|
||||
|
||||
|
||||
# multiprocessing
|
||||
pool_size = multiprocessing.cpu_count() * 2
|
||||
with multiprocessing.Pool(pool_size) as pool:
|
||||
try:
|
||||
results = pool.map(registered, url_list)
|
||||
except IndexError:
|
||||
pass
|
||||
print('face not found')
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
#pool_size = multiprocessing.cpu_count() * 2
|
||||
#with multiprocessing.Pool(pool_size) as pool:
|
||||
# try:
|
||||
# results = pool.map(registered, url_list)
|
||||
# except IndexError:
|
||||
# pass
|
||||
# print('face not found')
|
||||
# except FileNotFoundError:
|
||||
# pass
|
||||
|
||||
|
||||
#os.remove(img)
|
||||
# return 'unable to recognize face'
|
||||
|
||||
pool.close()
|
||||
# pool.close()
|
||||
#return results[0]
|
||||
result=registered(url_list)
|
||||
return 'Successfully saved encoding.........'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user