I want to create a way to where a task system is used to assign the specific model form is submitted then it is given to the users currently online to deal with processing said task.
I have currently set up the models and the forms that’s gonna be used for said project, now i wanna know how i can create a real time tasks distribution system. If i can create the distribution side of this project the rest will be a breeze.
Please be more specific and provide more details about exactly what it is you’re trying to create, how it’s going to be “triggered” or “activated”, and how it’s supposed to interact with the rest of the system.
The more details you can provide about your requirements, the easier it will be for one of the volunteers here to offer suggestions that you will likely find useful.
What i wanna create is a way for lets say a client is going to go into our forms fill it out with the necessary details and the moment they submit the form it will be given to one of the employees who are currently marked as “Online” by the system. After it is processed by the employee and is marked as approved or rejected it will be removed from their current task pool and moved to the next one in line.
I have currently Set up the database for it where it is given what type of request it is, the request number as well as the status given to it.
Ah okay. If that’s the case then Thank you appreciate the time.
I want to expand a bit on this.
Is there a possibility for this to be made in real time? base on my current understanding of Django is data is submitted into the backend in order for it to be updated the page needs to be refreshed in order to see the current data updated into it.
Ok, you’re talking about a completely different issue here.
If the situation you are describing is that:
Person A submits a form.
“Something happens”
Person B sees the results without needing to issue a request
then what you’re needing to implement here is something using Django Channels and websockets.
(However, you need to decide whether it’s really necessary to go this route. Depending upon the scale of the user-base, it’s frequently quite practical to implement this type of process flow using an AJAX polling process to identify system state changes.)
It doesn’t necessarily need channels and websockets. For a “simple” implementation an AJAX request on a timer or a timer HTMX request to look for new tasks would probably do the job.