Shouldn't this be testing `$PID`? As is, deploy often fails since the old workers haven't fully exited before the new ones are ready.