Git Product home page Git Product logo

Comments (6)

mnagy avatar mnagy commented on July 19, 2024

I'm not 100% sure I understand your problem. Could you please provide a simple reproducer script and steps to reproduce? Also, which version of Python?

from s2i-python-container.

geovanaSouza avatar geovanaSouza commented on July 19, 2024

We did more tests and isolate the problem. When we isolate the code, the problem doesn't happen.
My developer team will investigate the code now.

Apologies for the inconvenience.

from s2i-python-container.

geovanaSouza avatar geovanaSouza commented on July 19, 2024

Resolved set environment variable:

PYTHONUNBUFFERED=true

from s2i-python-container.

mnagy avatar mnagy commented on July 19, 2024

Hi, could you please elaborate? Is this something that could happen to
ither people? Is it something preventable by us? What does the mentioned
environment variable do?

On Mon, May 16, 2016, 21:25 Geovana [email protected] wrote:

Resolved set environment variable:

PYTHONUNBUFFERED=true


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#115 (comment)

from s2i-python-container.

geovanaSouza avatar geovanaSouza commented on July 19, 2024

Hello @mnagy ,

Set PYTHONUNBUFFERED works for me, but i don't know if this is good practice. In the python manual page don't show many information about this parameter:
https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED

Steps to reproduce:
oc new-app python:3.4 --name=test-log https://github.com/geovanaSouza/python_runner.git -e APP_FILE=python_runner2.py -l app=test-log

In the log don't show any message. When I wait for sometime (about 30 minutes) show the message in the log.

But, when I set PYTHONUNBUFFERED:
oc env dc test-log PYTHONUNBUFFERED=true

Show the message instantly for my app:
---> Running application from Python script (python_runner2.py) ...
App begin
Message loop
Message loop
Message loop
Message loop
Message loop
Message loop

from s2i-python-container.

geovanaSouza avatar geovanaSouza commented on July 19, 2024

I think when I don't set this parameter the message is stored in memory buffer. When the buffer is full, the message's show in the log.

from s2i-python-container.

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.