inital working version for review
refactor repeated code
removing prints
cr comments, improvements
adding arg for hook
adding comment
cr fixes
Merge pull request #1440 from edx/e0d/asg_lifecycle_watcher

inital working version for review