Пример #1
0
 def get_existing_process_list(self):
     if self.get_file_content() is not None:
         process_object_list = []
         for json_process in json.loads(self.get_file_content()):
             process = Process(json_process['process_name'])
             json_task_list = json_process['task_list']
             task_list = []
             for json_task in json_task_list:
                 task = Task()
                 task.start_time = json_task['start_time']
                 task.end_time = json_task['end_time']
                 task_list.append(task)
             process.task_list = task_list
             process_object_list.append(process)
         return process_object_list
     else:
         return None