celery terminate scan

This commit is contained in:
Yogesh Ojha
2020-09-29 10:21:44 +05:30
parent dea9e27bdd
commit 8b8fef8d1c
+1 -1
View File
@@ -151,7 +151,7 @@ def stop_scan(request, id):
obj = get_object_or_404(ScanHistory, celery_id=id)
if request.method == "POST":
# stop the celery task
app.control.revoke(id)
app.control.revoke(id, terminate=True)
obj.scan_status = 3
obj.save()
messageData = {'status': 'true'}