Issue: sys.exit(3) on background job that runs makemigrations - infinite loop
PR: https://github.com/crowdbotics/crowdbotics-slack-app/pull/1003
This gist proposes a solution to this issue by doing the same checks Django uses to either ask further questions during migrations creation or not. Currently our background job stays in a loop because we don't provide a valid answer to this questioner. Using the flag --no-input
isn't enough as there is still 3 scenarios that raise the questioner.
Calling makemigrations
can call either InteractiveMigrationQuestioner
or NonInteractiveMigrationQuestioner
.