<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
hi, <br>
I have commit a patch to sync notifier module under horizon with
oslo-incubator, I met the gate-horizon-python error, all the errors
are aimed at DatabseError.<br>
Code Review Link: <a class="moz-txt-link-freetext" href="https://review.openstack.org/#/c/76439/">https://review.openstack.org/#/c/76439/</a><br>
<br>
The specific error: django.db.utils.DatabaseError: DatabaseWrapper
objects created in a thread can only be used in that same thread.
The object with alias 'default' was created in thread id
140664492599040 and this is thread id 56616752.<br>
<br>
So I have google it and find that there are two ways to fix this<br>
<br>
1. <a class="moz-txt-link-freetext" href="https://code.djangoproject.com/ticket/17998">https://code.djangoproject.com/ticket/17998</a><br>
import eventlet<br>
eventlet.monkey_patch()<br>
<br>
2.https://bitbucket.org/akoha/django-digest/issue/10/conflict-with-global-databasewrapper<br>
replace<br>
cursor = self.db.connection.cursor()<br>
with<br>
cursor = db.connections[DEFAULT_DB_ALIAS].cursor()<br>
everywhere it appears in storage.py, and add to the imports:<br>
from django import db from django.db.utils import DEFAULT_DB_ALIAS<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<br>
Anyway, all these two solution are all not can be handled in my code
commit, <br>
So do you have any point of view to make this work?<br>
Thanks for all your help.<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</body>
</html>