Just to put a perspective on this bug, here are the reasons of why the current state it suboptimal AFAIU:
1) every top-level resource operation like create, delete etc are already scheduler.TaskRunner instances and wrapped in @wrappertask to drive subtasks, so introducing another layer is making things more complex.
2) when during "convergence" implementation we move to the framework of independent workers, each worker will be a simple single-threaded, not micro-threaded process processing a single resource action exclusively until completion or failure, so again scheduler logic will be an unnecessary level of complexity
3) if we ever decide that handle_* and check_*_complete must be handled by different workers, serializing the handler_data [1] will become a real issue if it holds such complex objects/functions like scheduler.* classes and methods
Just to put a perspective on this bug, here are the reasons of why the current state it suboptimal AFAIU:
1) every top-level resource operation like create, delete etc are already scheduler. TaskRunner instances and wrapped in @wrappertask to drive subtasks, so introducing another layer is making things more complex.
2) when during "convergence" implementation we move to the framework of independent workers, each worker will be a simple single-threaded, not micro-threaded process processing a single resource action exclusively until completion or failure, so again scheduler logic will be an unnecessary level of complexity
3) if we ever decide that handle_* and check_*_complete must be handled by different workers, serializing the handler_data [1] will become a real issue if it holds such complex objects/functions like scheduler.* classes and methods
[1] https:/ /github. com/openstack/ heat/blob/ master/ heat/engine/ resource. py#L506