Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ Celery's [user guide][1]. Send tasks from signal handlers without fear!
print_model.delay(model_pk)
transaction.commit()

## Caveats

Due to the task being sent after the current transaction has been commited, the
`PostTransactionTask` provided in this package does not return an
`celery.result.AsyncResult` as the original celery `Task` does.

Thus, `print_model.delay(model_pk)` simply returns `None`. In order to track
the task later on, the `task_id` can be predefined in the `apply_async` method:

from celery.utils import uuid

u = uuid()
print_model.apply_async((model_pk), {}, task_id=u)

## Run test suite

$ python setup.py test
Expand Down