added support for gracefull shutdown and web workers restart