Hi,
How to import uwsgi while running Initialize db scripts. ?
I have been importing uwsgi module in my main __init__ app script to deal
with forking issue faced by cassandra
import uwsgi
from uwsgidecorators import *
@postfork
def connect_cassandra_client():
CaSession.connect(['127.0.0.1'], certificate='/path/here')
print("connection to cassandra made")
After adding uwsgi modules, none of the initialize scripts will be
functional, since these scripts don't know how to import uwsgi, which is
accessible only when ran from a uwsgi server.
Traceback (most recent call last):
File
"/home/izero/devel/xxxxxxxxxx/xxxxxxxxxx_env/bin/initialize_yyyyyyyyy_db",
line 9, in <module>
load_entry_point('yyyyyyyyy==0.0', 'console_scripts',
'initialize_yyyyyyyyy_db')()
File
"/home/izero/devel/xxxxxxxxxx/xxxxxxxxxx_env/lib/python3.4/site-packages/pkg_resources.py",
line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File
"/home/izero/devel/xxxxxxxxxx/xxxxxxxxxx_env/lib/python3.4/site-packages/pkg_resources.py",
line 2363, in load_entry_point
return ep.load()
File
"/home/izero/devel/xxxxxxxxxx/xxxxxxxxxx_env/lib/python3.4/site-packages/pkg_resources.py",
line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/home/izero/devel/xxxxxxxxxx/yyyyyyyyy/yyyyyyyyy/__init__.py", line
26, in <module>
import uwsgi
ImportError: No module named 'uwsgi'
Does any one know how to deal with this issue ?
Srikanth
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.