#36919: Allow `TaskResult` (and `Task`) to be pickled
-------------------------------------+-------------------------------------
Reporter: Jake Howard | Type:
| Cleanup/optimization
Status: new | Component: Tasks
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
As part of implementing some task backends, it can be useful to pickle a
`TaskResult` to pass it around implementation.
Since it's a `dataclass` most of the implementation is already there - the
main issue is that `Task` itself can't be pickled as it references a
function. Replacing that with a string reference during pickling will
likely resolve the current issues.
The implementation isn't especially complex, so I'm not opposed to this
being closed and left to backend implementers to deal with instead.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36919>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.