Giter Club home page Giter Club logo

Comments (7)

nickstenning avatar nickstenning commented on July 17, 2024 3

If Django's runserver buffers its output, there's nothing Honcho can do about that. You can verify that this is not a Honcho issue by setting PYTHONUNBUFFERED=1 in the Procfile just for the Django process.

from honcho.

msabramo avatar msabramo commented on July 17, 2024

Ditto here.

[marca@marca-mac2 honcho]$ python -V
Python 3.4.2
[marca@marca-mac2 honcho]$ cat Procfile
web: cat

Without PYTHONUNBUFFERED, I get no output until I hit Ctrl-C:

[marca@marca-mac2 honcho]$ honcho start
^C13:43:22 system | web.1 started (pid=85574)
13:43:26 system | SIGINT received
13:43:26 system | sending SIGTERM to web.1 (pid 85574)
13:43:26 system | web.1 stopped (rc=-15)

With PYTHONUNBUFFERED=1, I do see it output web.1 started right away:

[marca@marca-mac2 honcho]$ PYTHONUNBUFFERED=1 honcho start
13:43:30 system | web.1 started (pid=85578)
^C13:43:32 system | SIGINT received
13:43:32 system | sending SIGTERM to web.1 (pid 85578)
13:43:32 system | web.1 stopped (rc=-15)

from honcho.

msabramo avatar msabramo commented on July 17, 2024

This seems to only happen on Python 3; it does not happen for me with Python 2.7.9.

from honcho.

msabramo avatar msabramo commented on July 17, 2024

Same behavior on Python 3.2 and 3.3.

from honcho.

derbroti avatar derbroti commented on July 17, 2024

Just a minor remark: The issue was introduced in the 0.6.x series. 0.5.0 works fine, every newer version has this issue.
Tested with python 3.4.x.

from honcho.

gregmuellegger avatar gregmuellegger commented on July 17, 2024

I also have this issue when using 0.7.1, even with Python 2.7. In the example below you can see that the Django startup message is swallowed if PYTHONUNBUFFERED is not set:

$ honcho start
09:46:58 system    | webpack.1 started (pid=7112)
09:46:58 system    | web.1 started (pid=7113)
09:46:58 webpack.1 | Live Reload listening on port 35729
09:46:58 webpack.1 | 
09:46:58 webpack.1 | webpack building...
09:47:04 webpack.1 | webpack built 515a36861413ce8243ac in 6445ms
^C09:47:08 system    | SIGINT received
09:47:08 system    | sending SIGTERM to webpack.1 (pid 7112)
09:47:08 system    | sending SIGTERM to web.1 (pid 7113)
09:47:08 system    | web.1 stopped (rc=-15)
09:47:08 system    | webpack.1 stopped (rc=-15)

$ PYTHONUNBUFFERED=1 honcho start
09:47:17 system    | web.1 started (pid=7234)
09:47:17 system    | webpack.1 started (pid=7233)
09:47:17 webpack.1 | Live Reload listening on port 35729
09:47:17 webpack.1 | 
09:47:17 webpack.1 | webpack building...
09:47:17 web.1     | Performing system checks...
09:47:17 web.1     | 
09:47:17 web.1     | System check identified no issues (0 silenced).
09:47:17 web.1     | April 15, 2016 - 07:47:17
09:47:17 web.1     | Django version 1.9.5, using settings 'website.settings'
09:47:17 web.1     | Starting development server at http://127.0.0.1:8000/
09:47:17 web.1     | Quit the server with CONTROL-C.
09:47:23 webpack.1 | webpack built 515a36861413ce8243ac in 6406ms
09:47:25 web.1     | [15/Apr/2016 07:47:25] "GET / HTTP/1.1" 200 38
09:47:27 web.1     | [15/Apr/2016 07:47:27] "GET / HTTP/1.1" 200 38
^C09:47:45 system    | SIGINT received
09:47:45 system    | sending SIGTERM to webpack.1 (pid 7233)
09:47:45 system    | sending SIGTERM to web.1 (pid 7234)
09:47:45 system    | web.1 stopped (rc=-15)
09:47:45 system    | webpack.1 stopped (rc=-15)

$ honcho version
honcho 0.7.1

$ python --version
Python 2.7.11

from honcho.

gregmuellegger avatar gregmuellegger commented on July 17, 2024

That... makes absolutely sense. Thanks for getting me on the right track!

from honcho.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.