@@ -775,7 +775,7 @@ Huey object
775
775
yet. If you want to wait for the result, specify ``blocking=True ``.
776
776
This will loop, backing off up to the provided ``max_delay ``, until the
777
777
value is ready or the ``timeout `` is reached. If the ``timeout `` is
778
- reached before the result is ready, a :py:class: `HueyException ` will be
778
+ reached before the result is ready, a :py:class: `ResultTimeout ` will be
779
779
raised.
780
780
781
781
.. seealso ::
@@ -1269,8 +1269,8 @@ Result
1269
1269
Traceback (most recent call last):
1270
1270
File "<stdin>", line 1, in <module>
1271
1271
File "/home/charles/tmp/huey/src/huey/huey/queue.py", line 46, in get
1272
- raise HueyException
1273
- huey.exceptions.HueyException
1272
+ raise ResultTimeout
1273
+ huey.exceptions.ResultTimeout
1274
1274
1275
1275
>>> res(blocking=True) # No timeout, will block until it gets data.
1276
1276
300
@@ -1303,14 +1303,16 @@ Result
1303
1303
attempting to fetch result.
1304
1304
:param bool revoke_on_timeout: if a timeout occurs, revoke the task,
1305
1305
thereby preventing it from running if it is has not started yet.
1306
+ :raises: ResultTimeout if blocking and timeout specified without result
1307
+ becoming ready yet.
1306
1308
1307
1309
Attempt to retrieve the return value of a task. By default,
1308
1310
:py:meth: `~Result.get ` will simply check for the value, returning
1309
1311
``None `` if it is not ready yet. If you want to wait for a value, you
1310
1312
can specify ``blocking=True ``. This will loop, backing off up to the
1311
1313
provided ``max_delay ``, until the value is ready or the ``timeout `` is
1312
1314
reached. If the ``timeout `` is reached before the result is ready, a
1313
- :py:class: `HueyException ` exception will be raised.
1315
+ :py:class: `ResultTimeout ` exception will be raised.
1314
1316
1315
1317
.. note :: Instead of calling ``.get()``, you can simply call the
1316
1318
:py:class: `Result ` object directly. Both methods accept the same
@@ -1430,6 +1432,11 @@ Exceptions
1430
1432
1431
1433
Raised by the consumer when a task lock cannot be acquired.
1432
1434
1435
+ .. py :class :: ResultTimeout
1436
+
1437
+ Raised when attempting to block on a call to :py:meth: `Result.get ` (for
1438
+ instance) and the timeout is exceeded without the result being ready.
1439
+
1433
1440
.. py :class :: CancelExecution
1434
1441
1435
1442
Cancel the execution of a task. Can be raised either within a
0 commit comments