@@ -710,7 +710,7 @@ def print_error_messages(worker):
710710 # we catch here.
711711 pass
712712
713- def fetch_and_process_remote_function (key , worker = global_worker ):
713+ def fetch_and_register_remote_function (key , worker = global_worker ):
714714 """Import a remote function."""
715715 function_id_str , function_name , serialized_function , num_return_vals , module , function_export_counter = worker .redis_client .hmget (key , ["function_id" , "name" , "function" , "num_return_vals" , "module" , "driver_export_counter" ])
716716 function_id = photon .ObjectID (function_id_str )
@@ -738,7 +738,7 @@ def fetch_and_process_remote_function(key, worker=global_worker):
738738 # Add the function to the function table.
739739 worker .redis_client .rpush ("FunctionTable:{}" .format (function_id .id ()), worker .worker_id )
740740
741- def fetch_and_process_reusable_variable (key , worker = global_worker ):
741+ def fetch_and_register_reusable_variable (key , worker = global_worker ):
742742 """Import a reusable variable."""
743743 reusable_variable_name , serialized_initializer , serialized_reinitializer = worker .redis_client .hmget (key , ["name" , "initializer" , "reinitializer" ])
744744 try :
@@ -755,7 +755,7 @@ def fetch_and_process_reusable_variable(key, worker=global_worker):
755755 "message" : traceback_str })
756756 worker .redis_client .rpush ("ErrorKeys" , error_key )
757757
758- def fetch_and_process_function_to_run (key , worker = global_worker ):
758+ def fetch_and_execute_function_to_run (key , worker = global_worker ):
759759 """Run on arbitrary function on the worker."""
760760 serialized_function , = worker .redis_client .hmget (key , ["function" ])
761761 try :
@@ -790,11 +790,11 @@ def import_thread(worker):
790790 export_keys = worker .redis_client .lrange ("Exports" , 0 , - 1 )
791791 for key in export_keys :
792792 if key .startswith ("RemoteFunction" ):
793- fetch_and_process_remote_function (key , worker = worker )
793+ fetch_and_register_remote_function (key , worker = worker )
794794 elif key .startswith ("ReusableVariables" ):
795- fetch_and_process_reusable_variable (key , worker = worker )
795+ fetch_and_register_reusable_variable (key , worker = worker )
796796 elif key .startswith ("FunctionsToRun" ):
797- fetch_and_process_function_to_run (key , worker = worker )
797+ fetch_and_execute_function_to_run (key , worker = worker )
798798 else :
799799 raise Exception ("This code should be unreachable." )
800800 worker .redis_client .hincrby (worker_info_key , "export_counter" , 1 )
@@ -813,11 +813,11 @@ def import_thread(worker):
813813 for i in range (worker .worker_import_counter , num_imports ):
814814 key = worker .redis_client .lindex ("Exports" , i )
815815 if key .startswith ("RemoteFunction" ):
816- fetch_and_process_remote_function (key , worker = worker )
816+ fetch_and_register_remote_function (key , worker = worker )
817817 elif key .startswith ("ReusableVariables" ):
818- fetch_and_process_reusable_variable (key , worker = worker )
818+ fetch_and_register_reusable_variable (key , worker = worker )
819819 elif key .startswith ("FunctionsToRun" ):
820- fetch_and_process_function_to_run (key , worker = worker )
820+ fetch_and_execute_function_to_run (key , worker = worker )
821821 else :
822822 raise Exception ("This code should be unreachable." )
823823 worker .redis_client .hincrby (worker_info_key , "export_counter" , 1 )
0 commit comments