Comments (17)
from forego.
@dickeyxxx is it showing output under regular foreman?
from forego.
yes it does
from forego.
I'm getting this same issue on OS X.
from forego.
@ddollar I feel like this is probably identical to an issue you fixed w/ Convox a while ago that's caused by python never outputting newlines
from forego.
Seems very likely I just don't have the bandwidth to fix it right now :)
from forego.
mind elaborating more on what the issue was? I could take a pass at fixing it. btw expect more bug reports and forego usage, we switched to forego in all the Heroku documentation (via the heroku local
command)
from forego.
In outlet.go it waits for a new line to display anything. Happy to give you a commit bit if you like.
from forego.
It's not that python doesn't "output" newlines, it's that Python doesn't flush stdout when it prints a newline. Most languages do.
from forego.
We stopped using forego after about an hour because of this issue :( Anything we can add to our django stack to allow us to use forego?
from forego.
I'm trying to figure out how to get the subprocess to flush in order to fix this, but you might be able to fix this in your procfile by adding 2>&1
to the end of the command
from forego.
Set PYTHONUNBUFFERED to a non-empty string
https://docs.python.org/2/using/cmdline.html#envvar-PYTHONUNBUFFERED
from forego.
PYTHONUNBUFFERED
doesn't seem to work:
env PYTHONUNBUFFERED=0 forego start -f fixtures/python/Procfile
forego | starting out.1 on port 5000
out.1 | foo
here's the fixture I'm using: https://github.com/ddollar/forego/compare/master...dickeyxxx:python-sync?expand=1
that branch also fixes the problem, but I'm not sure it's the best solution
from forego.
PYTHONUNBUFFERED
is for controlling python's pipe buffering, and while it can be useful on the consumption end of this problem (e.g. writing forego in python), it should have no effect on this.
The problem is that go is only printing lines when they are flushed, and python simply does not flush lines usually.
from forego.
I'm also having problems getting proper stack traces from flask
from forego.
My procfile:
web: gunicorn hello:app
dev: python hello.py
With forego start dev
I don't get proper stack traces.
With forego run python hello.py
I get full stack trace.
Ruby foreman works fine in both cases.
Aren't both commands supposed to have exactly the same result?
EDIT: The output: https://gist.github.com/aristidesfl/6a2127af781abb77ad9d
EDIT2: Flask app with an error https://github.com/aristidesfl/forego-flask-stacktrace-example
from forego.
For now forego is going to assume that subprocesses flush their output regularly. If any Pythonistas want to take a swing at fixing this globally please feel free to submit a PR!
from forego.
Related Issues (20)
- Latest forego version immediately crashes for rails / node app HOT 3
- PORT env var dependent on the position in the Procfile HOT 2
- forego only extend the first shell variable on the right side of the equal sign in .env file
- Forego adds sleeping bash process for every application (read from .profile) HOT 2
- How to pause or stop a process ?
- Windows Ubuntu
- does not pass on signal to children
- npm script hangs on Windows with "Terminate batch job (Y/N)?" prompt
- Forego i386 binary? HOT 2
- Could you create a new version tag which is compatible with go modules? HOT 1
- Official Forego Docker image
- "forego start" exits immediately with doing nothing on macOS HOT 2
- equinox.io shutting down, publish builds elsewhere? HOT 3
- Download page missing HOT 2
- Prevent environment variables from being overriden?
- request a new release HOT 1
- Immediate exit when using reflex OSX HOT 3
- forego exit In osx HOT 1
- child process doesn't exit in osx HOT 1
- Restart crashed processes HOT 5
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 forego.