Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django integration on settings.py #7

Open
GeniusWiki opened this issue May 30, 2019 · 0 comments
Open

Django integration on settings.py #7

GeniusWiki opened this issue May 30, 2019 · 0 comments

Comments

@GeniusWiki
Copy link

My app is django+gunicorn+gevent. In gunicorn, it runs 9 processes.

I insert stackimpact.start() in settings.py. My app can start and data is coming as well. However, when I run command line, say, ./manage.py migrate, it stuck there can not exit. If I use keyboard ctrl-c to terminate, the error stack is:

^CException ignored in: <module 'threading' from '/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py'>
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 1281, in _shutdown
    t.join()
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 1032, in join
    self._wait_for_tstate_lock()
  File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 1048, in _wait_for_tstate_lock
    elif lock.acquire(block, timeout):
  File "/Users/dapeng/.local/share/virtualenvs/Plato-XLrv9cCz/lib/python3.7/site-packages/stackimpact/runtime.py", line 139, in _handler
    prev_handler(signum, frame)
KeyboardInterrupt

As this migration is on our CI pipeline, we cannot manually to terminate it. How can I avoid that? What is the correct way use stackimpact with django?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant