You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,16 @@ result.refresh()
153
153
assert result.status == ResultStatus.COMPLETE
154
154
```
155
155
156
+
#### Exceptions
157
+
158
+
If a task raised an exception, its `.result` will be the exception raised:
159
+
160
+
```python
161
+
assertisinstance(result.result, ValueError)
162
+
```
163
+
164
+
As part of the serialization process for exceptions, some information, such as the traceback information, is lost. If the exception could not be serialized, the `.result` is `None`.
165
+
156
166
### Backend introspecting
157
167
158
168
Because `django-tasks` enables support for multiple different backends, those backends may not support all features, and it can be useful to determine this at runtime to ensure the chosen task queue meets the requirements, or to gracefully degrade functionality if it doesn't.
0 commit comments