move sleep to the right place and delete unused red herring
Merge pull request #2847 from dimagi/fix-services_restart

move sleep to the right place and delete unused red herring