`In my django application currently using huey queue to process tasks. Now I want to prioritise tasks in my queue based on my requirement. Found PriorityRedisHuey class in huey module. I updated my code to use PriorityRedisHuey instead of huey. I have redis server running in my system using docker.
** this is priorityredishuey**
enter image description here
Model changes to table
I added a priority field to table to add priority to queue based on my requirement
enter image description here
This is my settings change to use redis server.
**# Initialized priorityredishuey in settings file **
enter image description here
**This is my tasks file **
This is my tasks file(https://i.sstatic.net/26jQui3M.png)
`
** This is app config file**
(https://i.sstatic.net/O9VSvPU1.png)
these are the changes i made to use priorityredishuey.But when i am trying to run the run_huey it is giving this exception
enter image description here
I want to know how to resole this error
I am expecting to prioritise the tasks in my queue using PriorityRedisHuey.
Let say I have 10 tasks in queue already with priority 0
then i inserted a new task 11 with priority 1 then i want new task 11(because of high priority) need to be executed first before 10 tasks which are already in queue.
Meena is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.