Opened 3 hours ago
#36919 new Cleanup/optimization
Allow `TaskResult` (and `Task`) to be pickled
| Reported by: | Jake Howard | Owned by: | |
|---|---|---|---|
| Component: | Tasks | Version: | 6.0 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
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.
Note:
See TracTickets
for help on using tickets.