knify 1.8.40__tar.gz → 1.8.41__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {knify-1.8.40 → knify-1.8.41}/PKG-INFO +1 -1
- {knify-1.8.40 → knify-1.8.41}/knify/help.py +1 -1
- {knify-1.8.40 → knify-1.8.41}/knify/threadutil.py +4 -4
- {knify-1.8.40 → knify-1.8.41}/knify.egg-info/PKG-INFO +1 -1
- {knify-1.8.40 → knify-1.8.41}/LICENSE +0 -0
- {knify-1.8.40 → knify-1.8.41}/README.md +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify/__init__.py +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify/dateutil.py +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify/listutil.py +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify/logger.py +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify/objutil.py +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify/warnutil.py +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify.egg-info/SOURCES.txt +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify.egg-info/dependency_links.txt +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify.egg-info/requires.txt +0 -0
- {knify-1.8.40 → knify-1.8.41}/knify.egg-info/top_level.txt +0 -0
- {knify-1.8.40 → knify-1.8.41}/setup.cfg +0 -0
- {knify-1.8.40 → knify-1.8.41}/setup.py +0 -0
@@ -22,21 +22,21 @@ def print_task():
|
|
22
22
|
dateutil.date_to_str(time_estimate, dateutil.FORMAT_HMS)))
|
23
23
|
|
24
24
|
|
25
|
-
def func_wrapper(list_objs_: list,
|
26
|
-
|
25
|
+
def func_wrapper(list_objs_: list, _func_) -> None:
|
26
|
+
_func_(list_objs_)
|
27
27
|
task_lock.acquire()
|
28
28
|
task_info['processed'] = task_info['processed'] + len(list_objs_)
|
29
29
|
task_lock.release()
|
30
30
|
|
31
31
|
|
32
|
-
def thread_partition_call(list_obj: list,
|
32
|
+
def thread_partition_call(list_obj: list, _func_, thread_num: int, partition_num: int) -> None:
|
33
33
|
list_partition = listutil.partition(list_obj, partition_num)
|
34
34
|
threads = []
|
35
35
|
logger.info("=================== start ===================")
|
36
36
|
task_info['total'] = len(list_obj)
|
37
37
|
task_info['time_start'] = dateutil.now()
|
38
38
|
for index_, list_for_process in enumerate(list_partition):
|
39
|
-
t = threading.Thread(target=func_wrapper, args=(list_for_process,
|
39
|
+
t = threading.Thread(target=func_wrapper, args=(list_for_process, _func_))
|
40
40
|
t.start()
|
41
41
|
threads.append(t)
|
42
42
|
if len(threads) == thread_num or index_ == len(list_partition) - 1:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|