rq / django-rq

A simple app that provides django integration for RQ (Redis Queue)
MIT License
1.81k stars 282 forks source link

Allow Specifying Default Serializer for Django-RQ Queue #626

Closed sophcass closed 7 months ago

sophcass commented 10 months ago

Description

We are currently using django-rq alongside Redis Queue (RQ). In our setup, we've opted to use the JSONSerializer instead of the default pickle serializer. The reason behind this choice is the potential versioning issues that can arise from using pickle.

Details

We've successfully configured our setup to use the JSONSerializer for processing jobs in the queue. However we've run into an issue when it comes to utilising the django-rq admin dashboard while also using the JSONSerializer.

The challenge we face is that django-rq isn't aware of the serializer we've chosen, and as a result, it doesn't specify the serializer when fetching information to be displayed in the admin dashboard. As a result, the dashboard becomes somewhat limited and less useful for us.

The admin dashboard feature was one of the primary reasons we have adopted django-rq, and we are eager to continue leveraging it while also using the JSONSerializer for our jobs.

Proposed Solution

We would like to propose opening a PR to enhance django-rq's functionality. Specifically, to enable users to specify their desired default serializer when they initially set up the Redis queue. This enhancement would simplify our configuration process, ensuring that we don't need to set the serializer in multiple places when setting up the Redis queue via django-rq and also it would allow us to utilise the admin dashboard in conjunction with JSONSerializer.

If you are happy for us to make these changes, we can get to work on a PR to implement them! Let us know!

sophcass commented 8 months ago

@selwin it would be great to hear your thoughts about this proposition, so that we can start working on it.

selwin commented 7 months ago

Fixed in https://github.com/rq/django-rq/pull/630