celery / django-celery-results

Celery result back end with django
Other
697 stars 206 forks source link

Add terminate selected tasks action in admin #449

Open caoqianming opened 1 month ago

caoqianming commented 1 month ago

When a long task is in running state, I may need to terminate it for various reasons. So adding this action in admin is useful. I added the code and tested it and it works fine. In the beginning I was terminating tasks one by one in a for loop, later I realized that I could pass in a list, so I made some changes.

caoqianming commented 1 month ago

Okay, I'll try.

caoqianming commented 1 month ago

can you add tests to verify this? and do not introduce any regression?您能否添加测试来验证这一点?并且不引入任何回归?

Sorry, I have no idea to write this UNIT test. And i run python manage.py test with some errors in the picture. can you help me or give some suggestion, thank you image