DRF Pagination in Celery Task #8379
Unanswered
adamzev
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any way to use the LimitOffsetPagination DRF class in a Celery task?
The following simplified code is in a view and we'd like to move it to a task because it is slow:
The problem is this would require passing the request object to the task which isn't serializable. The two options I see are either writing my own pagination class or monkey patching a serializable request like object (I think one function and query_params are used from the object). Are there any other options that I'm not thinking of?
Beta Was this translation helpful? Give feedback.
All reactions