Skip to content

Commit

Permalink
correct the reschedule parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourour Benzarti committed Jul 23, 2024
1 parent 0ccea7e commit 8b717b2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions postgrestq/task_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,17 +579,18 @@ def _serialize(self, task: Any) -> str:
def _deserialize(self, blob: str) -> Any:
return json.loads(blob)

def reschedule(self, task_id: Optional[UUID]) -> None:
"""Move a task back from the processing- to the task queue.
def reschedule(self, task_id: UUID) -> None:
"""Move a task back from being processed to the task queue.
Workers can use this method to "drop" a work unit in case of
eviction.
eviction (because of an external issue like terminating a machine
by aws and not because of a failure).
This function does not modify the TTL.
Parameters
----------
task_id : str
task_id : UUID
the task ID
Raises
Expand Down

0 comments on commit 8b717b2

Please sign in to comment.