#NEWLINE# def call_task_manager_async( klass , func , cluster_id , * args , **kwargs ) : #NEWLINE# #INDENT# "This function calls a TaskManager's subclass 'klass' asynchronously.\n\n    It instantiates a TaskManager instance with given cluster_id.\n    This is because this call is made in a uWSGI mule -- we want to avoid\n    passing any objects (like Cluster), just simple Python objects.\n\n    :param klass: TaskManager's subclass\n    :param func: name of function to be called\n    :param cluster_id:\n    :param args: Arguments to pass to the function\n    :return:\n    " #NEWLINE# if uwsgidecorators : #NEWLINE# #INDENT# logger . debug ( 'MULE STARTING for %s.%s' , klass . __name__ , func ) #NEWLINE# #UNINDENT# instance = klass ( cluster_id = cluster_id ) #NEWLINE# getattr ( instance , func ) ( * args , ** kwargs ) #NEWLINE# if uwsgidecorators : #NEWLINE# #INDENT# logger . debug ( 'MULE FINISHED for %s.%s' , klass . __name__ , func )