small changes for cleanup
This commit is contained in:
parent
e8da52e486
commit
a0b206e711
@ -25,19 +25,19 @@ def run_recipe(source, *filter_args):
|
||||
pass # don't care if there isn't a done method
|
||||
|
||||
|
||||
##### allow selection between threading/processing #####
|
||||
# experiment with threading - do not use
|
||||
|
||||
#from threading import Thread as TaskType
|
||||
#from Queue import Queue
|
||||
#from threading import activeCount as active_tasks
|
||||
from threading import Thread as TaskType
|
||||
from Queue import Queue
|
||||
from threading import activeCount as active_tasks
|
||||
|
||||
from processing import Process as TaskType
|
||||
from processing import Queue
|
||||
def active_tasks():
|
||||
from processing import activeChildren
|
||||
return len(activeChildren())
|
||||
# uncomment to use processing instead of threading
|
||||
#from processing import Process as TaskType
|
||||
#from processing import Queue
|
||||
#def active_tasks():
|
||||
# from processing import activeChildren
|
||||
# return len(activeChildren())
|
||||
|
||||
########################################################
|
||||
|
||||
class FilterThread(TaskType):
|
||||
__create_count = 0
|
||||
@ -105,4 +105,4 @@ def run_recipe_multitasking(source, *filter_args):
|
||||
print 'joining', task
|
||||
task.join()
|
||||
print task, 'joined'
|
||||
task.done()
|
||||
task.done()
|
||||
|
@ -382,9 +382,9 @@ class NameCleaner(Filter):
|
||||
|
||||
Takes a list of target keys.
|
||||
|
||||
PhoneNumberCleaner( ('phone','fax'),
|
||||
number_format='%s%s%s-%s%s%s-%s%s%s%s')
|
||||
would format the phone & fax columns to 555-123-4567 format.
|
||||
NameCleaner( ('name', ), nomatch_name='raw_name')
|
||||
would attempt to split 'name' into firstname, middlename, lastname,
|
||||
and suffix columns, and if it did not fit would place it in raw_name
|
||||
"""
|
||||
|
||||
# first middle? last suffix?
|
||||
|
Loading…
Reference in New Issue
Block a user