Handle restart and redeploy events