Use getattr on settings instead of hasattr.
Worker checks for expired jobs at death and after connection timeout.