django-tasks
django-tasks copied to clipboard
Terminate worker a little harder
There have been some non-deterministic CI failures, only on Windows, around the database still being in use after Django tries to delete the SQLite database.
This PR tries to resolve that, by:
- Waiting longer between terminate attempts in tests. This may slow down tests, but should be faster for processes which behave nicely.
- Reset worker signals when a task is uncleanly terminated. This lets Python take over with handling what to do with subsequent signals, and hopefully terminate the process harder :hammer:.