コード例 #1
0
ファイル: init.py プロジェクト: ZubairNabi/ciel
 def _run(self, task_private, task_descriptor, task_record):
     
     args_dict = task_private["start_args"]
     # Some versions of simplejson make these ascii keys into unicode objects :(
     args_dict = dict([(str(k), v) for (k, v) in args_dict.items()])
     initial_task_out_obj = spawn_task_helper(task_record,
                                              task_private["start_handler"], 
                                              True,
                                              **args_dict)
     if isinstance(initial_task_out_obj, SWRealReference):
         initial_task_out_refs = [initial_task_out_obj]
     else:
         initial_task_out_refs = list(initial_task_out_obj)
     spawn_task_helper(task_record, "sync", True, delegated_outputs = task_descriptor["expected_outputs"], args = {"inputs": initial_task_out_refs}, n_outputs=1)
コード例 #2
0
ファイル: proc.py プロジェクト: jepst/ciel
 def spawn(self, request_args):
     """Spawns a child task. Arguments define a task_private structure. Returns a list
     of future references."""
     
     # Args dict arrives from sw with unicode keys :(
     str_args = dict([(str(k), v) for (k, v) in request_args.items()])
     
     if "small_task" not in str_args:
         str_args['small_task'] = False
     
     return spawn_task_helper(self.task_record, **str_args)
コード例 #3
0
    def spawn(self, request_args):
        """Spawns a child task. Arguments define a task_private structure. Returns a list
        of future references."""

        # Args dict arrives from sw with unicode keys :(
        str_args = dict([(str(k), v) for (k, v) in request_args.items()])

        if "small_task" not in str_args:
            str_args['small_task'] = False

        return spawn_task_helper(self.task_record, **str_args)