Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Assign NameStore AttributeLoad NameLoad attr ImportFrom alias ImportFrom alias ImportFrom alias Import alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Num If AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body If CompareGt NameLoad Num body Expr Yield Call AttributeLoad NameLoad attr NameLoad Assign NameStore Yield Call NameLoad NameLoad keyword NameLoad Raise Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body If CompareGt NameLoad Num body Expr Yield Call AttributeLoad NameLoad attr NameLoad If NameLoad body TryExcept body Expr Yield Call NameLoad NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign NameStore Num For NameStore Call NameLoad NameLoad body Assign NameStore Yield Call NameLoad NameLoad keyword CompareEq NameLoad NameLoad Assert CompareIs NameLoad NameLoad AugAssignAdd NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call NameLoad Num keyword NameLoad Raise Call NameLoad BinOpMod Str NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body TryExcept body Expr Yield Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Assert CompareEq Call NameLoad NameLoad Str Call NameLoad NameLoad Raise Call NameLoad Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body TryExcept body Expr Yield Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Assert CompareEq Call NameLoad NameLoad Str Call NameLoad NameLoad Raise Call AttributeLoad NameLoad attr Str orelse Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad Assign NameStore Yield NameLoad Raise Call AttributeLoad NameLoad attr Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call AttributeLoad NameLoad attr ListLoad Call NameLoad Num Call NameLoad Num Call NameLoad Num Call NameLoad Num Assert CompareGtE Call NameLoad ListComp NameLoad comprehension NameStore NameLoad AttributeLoad NameLoad attr Num Assert UnaryOpNot AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Yield Call AttributeLoad NameLoad attr Num Assign NameStore Yield NameLoad Assert CompareGtE Call NameLoad ListComp NameLoad comprehension NameStore NameLoad AttributeLoad NameLoad attr Num Assert BoolOpAnd AttributeLoad SubscriptLoad NameLoad Index Num attr CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr Num Assert CompareEq SubscriptLoad NameLoad Index Num Num Assert BoolOpAnd AttributeLoad SubscriptLoad NameLoad Index Num attr CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr Num Assert BoolOpAnd AttributeLoad SubscriptLoad NameLoad Index Num attr CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr Num Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call AttributeLoad NameLoad attr ListLoad Call NameLoad Num keyword NameLoad Call NameLoad Num Call NameLoad Num Assert CompareEq Call NameLoad ListComp NameLoad comprehension NameStore NameLoad AttributeLoad NameLoad attr Num Assert UnaryOpNot AttributeLoad SubscriptLoad NameLoad Index Num attr Assert BoolOpAnd AttributeLoad SubscriptLoad NameLoad Index Num attr CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr Num Assert UnaryOpNot AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Yield Call AttributeLoad NameLoad attr Num Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert BoolOpAnd AttributeLoad SubscriptLoad NameLoad Index Num attr CompareEq AttributeLoad SubscriptLoad NameLoad Index Num attr Num TryExcept body Expr Yield NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Assert NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num Assign NameStore Yield NameLoad Print NameLoad Assert CompareIs NameLoad NameLoad Assert UnaryOpNot AttributeLoad NameLoad attr Assign NameStore Yield Call NameLoad Num Assert AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Yield NameLoad Assert CompareIs NameLoad NameLoad Assert UnaryOpNot AttributeLoad NameLoad attr Assign NameStore Call NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Yield NameLoad Assert CompareIs NameLoad NameLoad Assert AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Yield NameLoad Assert CompareIs NameLoad NameLoad Assert UnaryOpNot AttributeLoad NameLoad attr Expr Yield Call AttributeLoad NameLoad attr Num Assert AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num Assert AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num Assert AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Num keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Yield NameLoad Assert CompareIs NameLoad NameLoad Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Assign NameStore Yield Call NameLoad Num Assert AttributeLoad NameLoad attr Assert CompareEq AttributeLoad NameLoad attr Num Expr Yield Call AttributeLoad NameLoad attr Num Assert AttributeLoad NameLoad attr Assert CompareEq Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Str Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore Call NameLoad Num body Assign NameStore Call NameLoad Num keyword NameLoad keyword BinOpMult NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Yield NameLoad Assert CompareIs NameLoad NameLoad Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Yield Call AttributeLoad NameLoad attr Num Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert CompareIs AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Assert CompareIs AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Expr Yield Call AttributeLoad NameLoad attr Num Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Yield Call AttributeLoad NameLoad attr ListLoad Call NameLoad Num Call NameLoad Num Call NameLoad Num Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert UnaryOpNot AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Yield NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Num Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Yield ListLoad Call NameLoad Num Call NameLoad Num Call NameLoad Num Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert AttributeLoad SubscriptLoad NameLoad Index Num attr Assert CompareEq SubscriptLoad NameLoad Index Num Num Raise Call AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Num Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd Num Num Num Num Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Num keyword Num Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Num Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr CompareIs NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad AttributeLoad NameLoad attr
N/A N/A Tests for the workers module. N/A Queue N/A logging N/A sys N/A time N/A unittest N/A gflags N/A FLAGS N/A gflags FLAGS dpxdt.client workers dpxdt.client fetch_worker dpxdt.client timer_worker N/A test_utils EchoThread N/A N/A workers WorkerThread N/A handle_item N/A N/A self item N/A N/A N/A N/A N/A time sleep 0.1 N/A N/A item should_die N/A N/A N/A Exception N/A Dying on %d N/A item input_number N/A N/A item output_number N/A item input_number N/A item N/A N/A EchoItem N/A N/A workers WorkItem N/A __init__ N/A N/A self number should_die N/A False N/A N/A N/A N/A N/A workers WorkItem __init__ self N/A N/A self input_number number N/A N/A self output_number None N/A N/A self should_die should_die N/A N/A EchoChild N/A N/A workers WorkflowItem N/A run N/A N/A self number should_die wait_seconds N/A False 0 N/A N/A N/A wait_seconds 0 N/A N/A N/A N/A N/A timer_worker TimerItem wait_seconds N/A item N/A N/A EchoItem number should_die should_die N/A N/A N/A workers Return N/A item output_number N/A N/A EchoChildWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self number should_die wait_seconds N/A False 0 N/A N/A N/A wait_seconds 0 N/A N/A N/A N/A N/A timer_worker TimerItem wait_seconds N/A should_die N/A N/A N/A N/A N/A N/A EchoChild number should_die should_die N/A N/A N/A Exception N/A e N/A N/A e N/A N/A N/A workers Return number N/A N/A RootWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self child_count die_on N/A -1 N/A N/A total 0 N/A i N/A xrange child_count N/A N/A number N/A N/A EchoChild i should_die N/A die_on i N/A N/A number i N/A total number N/A N/A self result total N/A N/A GeneratorExceptionChild N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A number N/A N/A EchoChild 4 should_die False N/A N/A Exception N/A My exception here %d number N/A N/A GeneratorExceptionReraiseParent N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A N/A N/A N/A N/A GeneratorExceptionChild N/A N/A N/A Exception N/A e N/A N/A N/A N/A str e My exception here 4 N/A str e N/A N/A Exception Another exception N/A N/A RootGeneratorExceptionWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A N/A N/A N/A N/A GeneratorExceptionReraiseParent N/A N/A N/A Exception N/A e N/A N/A N/A N/A str e Another exception N/A str e N/A N/A N/A workers Return good N/A N/A N/A N/A workers Return bad N/A N/A RootWaitAllWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self child_count N/A N/A N/A wait_all N/A N/A EchoItem i N/A i N/A xrange child_count N/A output N/A wait_all N/A N/A N/A workers Return N/A sum N/A N/A x output_number N/A x output N/A N/A RootWaitAnyWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A output N/A N/A N/A workers WaitAny N/A N/A EchoItem 10 N/A EchoChild 42 N/A EchoItem 2 N/A EchoItem 25 N/A N/A N/A len N/A x N/A x output N/A x done 1 N/A N/A N/A N/A output N/A 1 done N/A N/A N/A N/A timer_worker TimerItem 2 N/A results N/A output N/A N/A N/A len N/A x N/A x output N/A x done 1 N/A N/A N/A N/A results N/A 0 done N/A N/A N/A results N/A 0 output_number 10 N/A N/A N/A results N/A 1 42 N/A N/A N/A N/A results N/A 2 done N/A N/A N/A results N/A 2 output_number 2 N/A N/A N/A N/A results N/A 3 done N/A N/A N/A results N/A 3 output_number 25 N/A N/A N/A workers Return Donezo N/A N/A RootWaitAnyExceptionWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A output N/A N/A N/A workers WaitAny N/A N/A EchoChild 42 should_die True N/A EchoItem 10 N/A EchoItem 33 N/A N/A N/A len N/A x N/A x output N/A x done 1 N/A N/A N/A N/A output N/A 0 done N/A N/A N/A N/A output N/A 1 done N/A N/A N/A output N/A 1 output_number 10 N/A N/A N/A N/A output N/A 2 done N/A N/A N/A N/A timer_worker TimerItem 2 N/A N/A N/A output N/A 0 done N/A N/A N/A N/A output N/A 2 done N/A N/A N/A output N/A 2 output_number 33 N/A N/A N/A N/A output N/A N/A N/A Exception N/A e N/A N/A N/A N/A workers Return N/A str e N/A N/A False Should have raised N/A N/A FireAndForgetEchoItem N/A EchoItem N/A N/A fire_and_forget True N/A RootFireAndForgetWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A job1 N/A FireAndForgetEchoItem 10 N/A result N/A job1 N/A result N/A N/A result job1 N/A N/A N/A result done N/A result N/A N/A EchoItem 25 N/A N/A result done N/A N/A N/A result output_number 25 N/A job2 N/A EchoItem 30 N/A N/A job2 fire_and_forget True N/A result N/A job2 N/A N/A result job2 N/A N/A N/A result done N/A job3 N/A FireAndForgetEchoItem 66 N/A N/A job3 fire_and_forget False N/A result N/A job3 N/A N/A result job3 N/A N/A result done N/A N/A N/A result output_number 66 N/A job4 N/A EchoChild 22 N/A N/A job4 fire_and_forget True N/A result N/A job4 N/A N/A result job4 N/A N/A N/A result done N/A N/A N/A N/A timer_worker TimerItem 2 N/A N/A job1 done N/A N/A N/A job1 output_number 10 N/A N/A job2 done N/A N/A N/A job2 output_number 30 N/A N/A job4 done N/A N/A N/A job4 result 22 N/A N/A N/A workers Return Okay N/A N/A RootFireAndForgetExceptionWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A job N/A EchoChild 99 should_die True N/A N/A job fire_and_forget True N/A result N/A job N/A N/A result job N/A N/A N/A result done N/A N/A N/A result error N/A result N/A N/A EchoItem 25 N/A N/A result done N/A N/A N/A result output_number 25 N/A N/A N/A N/A timer_worker TimerItem 2 N/A N/A job done N/A N/A N/A str N/A N/A job error N/A 1 Dying on 99 N/A N/A N/A workers Return No fire and forget error N/A N/A RootFireAndForgetMultipleExceptionWorkflow N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A jobs N/A N/A i N/A xrange 3 N/A N/A job N/A EchoChildWorkflow 99 should_die True wait_seconds N/A i 0.5 N/A N/A job fire_and_forget True N/A result N/A job N/A N/A result job N/A N/A N/A result done N/A N/A N/A result error N/A N/A N/A jobs append job N/A N/A N/A N/A timer_worker TimerItem 0.5 N/A N/A N/A jobs N/A 0 done N/A N/A N/A N/A jobs N/A 1 done False N/A N/A N/A N/A jobs N/A 2 done False N/A N/A N/A N/A timer_worker TimerItem 1.5 N/A N/A N/A jobs N/A 0 done N/A N/A N/A jobs N/A 1 done N/A N/A N/A jobs N/A 2 done N/A N/A N/A workers Return All errors seen N/A N/A RootWaitAnyFireAndForget N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A output N/A N/A N/A workers WaitAny N/A N/A FireAndForgetEchoItem 22 N/A EchoItem 14 N/A EchoChild 98 N/A N/A N/A output N/A 0 done N/A N/A N/A output N/A 1 done N/A N/A N/A N/A output N/A 2 done N/A result N/A output N/A N/A N/A result N/A 2 98 N/A N/A N/A workers Return All done N/A N/A RootWaitAllFireAndForget N/A N/A workers WorkflowItem N/A run N/A N/A self N/A N/A N/A output N/A N/A N/A FireAndForgetEchoItem 22 N/A EchoItem 14 N/A EchoChild 98 N/A N/A N/A output N/A 0 done N/A N/A N/A output N/A 1 done N/A N/A N/A output N/A 2 98 N/A N/A N/A workers Return Waited for all of them N/A N/A WorkflowThreadTest N/A N/A unittest TestCase N/A N/A Tests for the WorkflowThread worker. setUp N/A N/A self N/A N/A N/A Sets up the test harness. N/A N/A FLAGS fetch_frequency 100 N/A N/A FLAGS polltime 0.01 N/A N/A self coordinator N/A N/A workers get_coordinator N/A N/A self echo_queue N/A N/A Queue Queue N/A N/A N/A N/A self coordinator register EchoItem N/A self echo_queue N/A N/A N/A N/A self coordinator register FireAndForgetEchoItem N/A self echo_queue N/A N/A N/A N/A N/A self coordinator worker_threads append N/A EchoThread N/A self echo_queue N/A N/A self coordinator input_queue N/A N/A self timer_queue N/A N/A Queue Queue N/A N/A N/A N/A self coordinator register N/A timer_worker TimerItem N/A self timer_queue N/A N/A N/A N/A N/A self coordinator worker_threads append N/A N/A timer_worker TimerThread N/A self timer_queue N/A N/A self coordinator input_queue N/A N/A N/A N/A self coordinator start N/A tearDown N/A N/A self N/A N/A N/A Cleans up the test harness. N/A N/A N/A time sleep 1 N/A N/A N/A N/A self coordinator stop N/A N/A N/A N/A self coordinator join N/A N/A N/A self assertEquals 0 N/A len N/A N/A self coordinator pending N/A testMultiLevelWorkflow N/A N/A self N/A N/A N/A Tests a multi-level workflow. N/A work N/A RootWorkflow 5 N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals N/A N/A N/A N/A 4 3 2 1 0 N/A work result N/A testMultiLevelWorkflowException N/A N/A self N/A N/A N/A Tests when a child of a child raises an exception. N/A work N/A RootWorkflow 5 die_on 3 N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A N/A N/A finished check_result N/A N/A N/A Exception N/A e N/A N/A N/A N/A self assertEquals Dying on 3 N/A str e N/A testWorkflowExceptionPropagation N/A N/A self N/A N/A N/A Tests when workflow items in a hierarchy re-raise exceptions. N/A work N/A RootGeneratorExceptionWorkflow N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals good N/A work result N/A testWaitAll N/A N/A self N/A N/A N/A Tests waiting on all items in a list of work. N/A work N/A RootWaitAllWorkflow 4 N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals 6 N/A work result N/A testWaitAny N/A N/A self N/A N/A N/A Tests using the WaitAny class. N/A work N/A RootWaitAnyWorkflow N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals Donezo N/A work result N/A testWaitAnyException N/A N/A self N/A N/A N/A Tests using the WaitAny class when an exception is raised. N/A work N/A RootWaitAnyExceptionWorkflow N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals Dying on 42 N/A work result N/A testFireAndForget N/A N/A self N/A N/A N/A Tests running fire-and-forget WorkItems. N/A work N/A RootFireAndForgetWorkflow N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals Okay N/A work result N/A testFireAndForgetException N/A N/A self N/A N/A N/A Tests that exceptions from fire-and-forget WorkItems are ignored. N/A work N/A RootFireAndForgetExceptionWorkflow N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals No fire and forget error N/A work result N/A testFireAndForgetException_MultiLevel N/A N/A self N/A N/A N/A Tests exceptions in multi-level fire-and-forget work items. N/A work N/A RootFireAndForgetMultipleExceptionWorkflow N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals All errors seen N/A work result N/A testWaitAnyFireAndForget N/A N/A self N/A N/A N/A Tests wait any with a mix of blocking and non-blocking items. N/A work N/A RootWaitAnyFireAndForget N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals All done N/A work result N/A testWaitAllFireAndForget N/A N/A self N/A N/A N/A Tests wait all with a mix of blocking and non-blocking items. N/A work N/A RootWaitAllFireAndForget N/A N/A work root True N/A N/A N/A N/A N/A self coordinator input_queue put work N/A finished N/A N/A N/A N/A self coordinator output_queue get N/A N/A N/A self assertTrue N/A work finished N/A N/A N/A finished check_result N/A N/A N/A self assertEquals Waited for all of them N/A work result N/A N/A main N/A N/A argv N/A N/A N/A N/A N/A test_utils debug_log_everything N/A argv N/A FLAGS argv N/A N/A N/A unittest main argv argv N/A N/A N/A __name__ __main__ N/A N/A N/A main N/A sys argv