Skip to content

Commit 8b717b2

Browse files
committed
correct the reschedule parameters
1 parent 0ccea7e commit 8b717b2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

postgrestq/task_queue.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -579,17 +579,18 @@ def _serialize(self, task: Any) -> str:
579579
def _deserialize(self, blob: str) -> Any:
580580
return json.loads(blob)
581581

582-
def reschedule(self, task_id: Optional[UUID]) -> None:
583-
"""Move a task back from the processing- to the task queue.
582+
def reschedule(self, task_id: UUID) -> None:
583+
"""Move a task back from being processed to the task queue.
584584
585585
Workers can use this method to "drop" a work unit in case of
586-
eviction.
586+
eviction (because of an external issue like terminating a machine
587+
by aws and not because of a failure).
587588
588589
This function does not modify the TTL.
589590
590591
Parameters
591592
----------
592-
task_id : str
593+
task_id : UUID
593594
the task ID
594595
595596
Raises

0 commit comments

Comments
 (0)