I've written some piece of code I want to run using django-rq, i.e. use workers. I created a form where the user can chose several objects and press a button to start the operation. for this purpose I have in my views.py:
class ObjectOperationForm(forms.Form):
objects=forms.ModelMultipleChoiceField(
queryset=ModelName.objects.order_by('name'), required=True)
class ClusterOperation(FormView):
form_class = ObjectOperationForm
template_name = 'template.html'
success_url = '/'
where should I add the piece of code to start executing the jobs using workers? Is it from one of the FormView's function? form_valid/dispatch ?