Skip to content

Django integration on settings.py #7

Open
@GeniusWiki

Description

@GeniusWiki

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions