)]}'
{"taskflow/engines/action_engine/compiler.py":[{"author":{"_account_id":9648,"name":"Greg Hill","email":"greg.hill@rackspace.com","username":"jimbobhickville"},"change_message_id":"69bd97232cad5ab64d9d1a1dd4f522559ece732d","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __init__(self, atom, kind):"},{"line_number":54,"context_line":"        self._atom \u003d atom"},{"line_number":55,"context_line":"        self._compiled_atom \u003d {"},{"line_number":56,"context_line":"            \u0027provides\u0027: atom.provides,"},{"line_number":57,"context_line":"            \u0027requires\u0027: atom.requires,"},{"line_number":58,"context_line":"            \u0027revert\u0027: atom.revert,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba63e191_a560ae36","line":55,"updated":"2016-01-19 13:45:13.000000000","message":"I mentioned something along these lines in IRC, but I wonder if we should rather have a compile method on Atom that creates this WorkUnit and passes these things in.  Something like:\n\natom.compile(intention\u003dEXECUTE)\n\ndef compile(self, intention):\n    method \u003d self.revert if intention \u003d\u003d REVERT else self.execute\n    requires, optional \u003d _build_arg_mapping(...)\n    return WorkUnit(provides\u003dself.provides, requires\u003drequires, ...)\n\nThe old Atom class would just return the same thing for either intention, but the new one would derive the required/optional/rebind on the fly based on the intention.\n\nThoughts?","commit_id":"dc5fc5286fa147e4658f72b0082ec9bd7c41798c"}]}
