Comments (7)
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.
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.
This seems to only happen on Python 3; it does not happen for me with Python 2.7.9.
from honcho.
Same behavior on Python 3.2 and 3.3.
from honcho.
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.
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.
That... makes absolutely sense. Thanks for getting me on the right track!
from honcho.
Related Issues (20)
- Virutalenv on Windows + *nix HOT 2
- Multiple Printers to Honcho Manager? HOT 3
- Dashes in process types HOT 1
- Feature proposal: a honcho module API HOT 3
- Project Status of Honcho? HOT 1
- Stop honcho from Makefile HOT 5
- [bug] Subparsers override common common_args HOT 1
- Honcho buffers output to file HOT 2
- Prefix without timestamp
- Py3.8 RuntimeWarning: line buffering isn't supported in binary mode HOT 4
- PROCFILE envvar is respected only if provided on .env file HOT 1
- Why isn't there "stop" command? HOT 4
- New Release? HOT 4
- systemd exporter not working
- honcho run doesn't load .env variables HOT 2
- Prevent existing environment variables from being overriden?
- Thanks HOT 1
- Support color output by processes
- Why start_new_session=True ? (sorry not really an issue)
- start honcho application at start app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honcho.