def _check_revoked(self, revoke_id, timestamp=None, peek=True):
res = self.get(revoke_id, peek=True)<EOL>if res is None:<EOL><INDENT>return False, False<EOL><DEDENT>revoke_until, revoke_once = res<EOL>if revoke_until is not None and timestamp is None:<EOL><INDENT>timestamp = self._get_timestamp()<EOL><DEDENT>if revoke_once:<EOL><INDENT>return True, not peek<EOL><DEDENT>elif revoke_until is not None and revoke_until <= timestamp:<EOL><INDENT>return False, not peek<EOL><DEDENT>else:<EOL><INDENT>return True, False<EOL><DEDENT>
Checks if a task is revoked, returns a 2-tuple indicating:

1. Is task revoked?
2. Should task be restored?