Skip to content

Commit

Permalink
Clarify where to place lock_task context manager.
Browse files Browse the repository at this point in the history
Replaces #570
  • Loading branch information
coleifer committed Dec 17, 2020
1 parent 430b006 commit a4b8044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ Huey object

This lock is designed to be used to prevent multiple invocations of a
task from running concurrently. Can be used as either a context-manager
or as a task decorator. If using as a decorator, place it directly
above the function declaration.
within the task, or as a task decorator. If using as a decorator, place
it directly above the function declaration.

If a second invocation occurs and the lock cannot be acquired, then a
:py:class:`TaskLockedException` is raised, which is handled by the
Expand Down

0 comments on commit a4b8044

Please sign in to comment.