Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. resize | 44eb3769-c446-45d1-b29b-7365bf60f2a2 | ["0a2bddb1-1c97-4582-8624-532e42d21408", "7eb4737d-6aa3-4ece-80eb-75adbbe6e7ce"]
  2. migrate | 0a2bddb1-1c97-4582-8624-532e42d21408 | ["2e1cc462-b3fa-4543-9d6e-036fc093c121"]
  3. sleep | 2e1cc462-b3fa-4543-9d6e-036fc093c121 | ["c42acfd6-2a98-4f41-8489-1fc8c1e8d62c", "c0cdd22b-8ef2-42dc-8aec-9e7e99e87794"]
  4. nop | c0cdd22b-8ef2-42dc-8aec-9e7e99e87794 | []
  5. nop | c42acfd6-2a98-4f41-8489-1fc8c1e8d62c | []
  6. migrate | 7eb4737d-6aa3-4ece-80eb-75adbbe6e7ce | ["2e1cc462-b3fa-4543-9d6e-036fc093c121"]
  7.  
  8. for chunk_idx, actions_chunk in enumerate(action_chunks):
  9. for action in actions_chunk:
  10. action_graph.add_node(action)
  11.  
  12. # all other actions
  13. parent_nodes = []
  14. if not idx and not chunk_idx:
  15. parent_nodes = []
  16. elif leaf_groups:
  17. parent_nodes = leaf_groups[0]
  18.  
  19. for parent_node in parent_nodes:
  20. action_graph.add_edge(parent_node, action)
  21. action.parents.append(parent_node.uuid)
  22.  
  23. if leaf_groups:
  24. leaf_groups.pop(0)
  25. leaf_groups.extend([[action] for action in actions_chunk])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement