Skip to content
Snippets Groups Projects
Commit 1d14618a authored by Nathaniel Manista's avatar Nathaniel Manista
Browse files

Fix grace period bug in _end.accept_ticket

Tickets should not be ignored if the end is in a grace period; rather
they should be ignored if they are for an unrecognized (likely new)
operation and the end is in a grace period.
parent 68e63c7f
No related branches found
No related tags found
No related merge requests found
...@@ -203,11 +203,11 @@ class _End(End): ...@@ -203,11 +203,11 @@ class _End(End):
def accept_ticket(self, ticket): def accept_ticket(self, ticket):
"""See links.Link.accept_ticket for specification.""" """See links.Link.accept_ticket for specification."""
with self._lock: with self._lock:
if self._cycle is not None and not self._cycle.grace: if self._cycle is not None:
operation = self._cycle.operations.get(ticket.operation_id) operation = self._cycle.operations.get(ticket.operation_id)
if operation is not None: if operation is not None:
operation.handle_ticket(ticket) operation.handle_ticket(ticket)
elif self._servicer_package is not None: elif self._servicer_package is not None and not self._cycle.grace:
termination_action = _termination_action( termination_action = _termination_action(
self._lock, self._stats, ticket.operation_id, self._cycle) self._lock, self._stats, ticket.operation_id, self._cycle)
operation = _operation.service_operate( operation = _operation.service_operate(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment