Get the next available work item that isn't completed or locked. Args: worker_lock_timeout_secs: Number of seconds before considering a worker lock stale (default 30 mins) Returns: WorkItem if work is available,
(self, worker_lock_timeout_secs: int = 1800)
| 63 | |
| 64 | @abc.abstractmethod |
| 65 | async def get_work(self, worker_lock_timeout_secs: int = 1800) -> Optional[WorkItem]: |
| 66 | """ |
| 67 | Get the next available work item that isn't completed or locked. |
| 68 | |
| 69 | Args: |
| 70 | worker_lock_timeout_secs: Number of seconds before considering |
| 71 | a worker lock stale (default 30 mins) |
| 72 | |
| 73 | Returns: |
| 74 | WorkItem if work is available, None if queue is empty |
| 75 | """ |
| 76 | pass |
| 77 | |
| 78 | @abc.abstractmethod |
| 79 | async def mark_done(self, work_item: WorkItem) -> None: |