Monday, March 13, 2023

System checks order

Django systems checks are running in an none determinate order. This is a problem if i write my own checks that are dependent to each other and must run in a specific order. E.g. if i import some data to the database in a deployment process where the tables are related to each other they must be imported an a well defined order to full fill the database constraints. I would expect that checks will run in the order in that I "register" them. But this is not the fact today because the list of checks will be stored in a "set" and not in a "list". Why do "checks" use "sets" and not "lists"? Is there an important reason? I modified "cores/checks/register.py" from "sets" tho "lists" and everything works fine!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/69d61744-14a6-4592-a2c2-63a260907602n%40googlegroups.com.

No comments:

Post a Comment