Skip to content

Commit

Permalink
chore: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Nov 13, 2023
1 parent d84e330 commit a291cb4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/task_processor/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ def register_task_handler( # noqa: C901
:param TaskPriority priority: task priority.
:param bool transaction_on_commit: (`SEPARATE_THREAD` task run method only)
Whether to wrap the task call in `transanction.on_commit`. Defaults to `True`.
:rtype: TaskProtocol
We need this for the task to be able to access data committed with the current
transaction. If the task is invoked outside of a transaction, it will start
immediately.
Pass `False` if you want the task to start immediately regardless of current
transaction.
:rtype: TaskHandler
"""

def wrapper(f: typing.Callable[P, None]) -> TaskHandler[P]:
Expand Down

0 comments on commit a291cb4

Please sign in to comment.