When initializing YETI, the line register_query_handler(StixXml111QueryHandler, name="StixXml111QueryHandler") in StixXml111QueryHandler.py was causing an exception to be raised: django.core.exceptions.AppRegistryNotReady.
This might be a bug in register_query_handler / register_message_handler in management.py
In those functions, depending on when in the application startup they are called, <Model>.objects.get_or_create( ... ) might succeed or fail. For known errors (currently, only DatabaseError), the logic is to "try again after the database is done initializing", which is done by hooking into the post_syncdb signal.
This issue is to:
1) Determine whether django.core.exceptions.AppRegistryNotReady is a "known" error that should be handled in the same way as DatabaseError.
2) If so, handle it the same way
3) If not, figure out a different way to prevent that from coming up
Unfortunately, I'm not able to reproduce the error on my system. If somebody can detail how to reproduce the error, that would be good.
Per https://github.com/TAXIIProject/yeti/issues/65:
When initializing YETI, the line
register_query_handler(StixXml111QueryHandler, name="StixXml111QueryHandler")
inStixXml111QueryHandler.py
was causing an exception to be raised:django.core.exceptions.AppRegistryNotReady
.This might be a bug in
register_query_handler
/register_message_handler
inmanagement.py
In those functions, depending on when in the application startup they are called,
<Model>.objects.get_or_create( ... )
might succeed or fail. For known errors (currently, onlyDatabaseError
), the logic is to "try again after the database is done initializing", which is done by hooking into thepost_syncdb
signal.This issue is to: 1) Determine whether
django.core.exceptions.AppRegistryNotReady
is a "known" error that should be handled in the same way asDatabaseError
. 2) If so, handle it the same way 3) If not, figure out a different way to prevent that from coming upUnfortunately, I'm not able to reproduce the error on my system. If somebody can detail how to reproduce the error, that would be good.