Seems there's a timeout argument - from
https://docs.prefect.io/api/latest/core/task.html:
• `timeout (Union[int, timedelta], optional)`: The amount of time (in seconds) to wait while running this task before a timeout occurs; note that sub-second resolution is not supported, even when passing in a timedelta.