Code Monkey home page Code Monkey logo

Comments (3)

gi0baro avatar gi0baro commented on August 17, 2024 1

@gi0baro i managed to run it with custom wrapper (made of the original file):

it should work also without the threading lock, as application import is done on each worker (but those are separated processes, not threads) and from a single thread.

Where i can find doc on logging config?

We're still managing to write documentation, but the logging config in Granian relies on standard logging dict config. You can look at the default configuration directly in the code: https://github.com/emmett-framework/granian/blob/master/granian/log.py#L28.
Access logs atoms are in the README instead.

from granian.

gi0baro avatar gi0baro commented on August 17, 2024

Seems a keystone related issue, as the target you set to Granian is not actually the WSGI application, but an executable script.

I'm pretty confident gunicorn or hypercorn will exhibit the same behaviour.
Googling a bit it seems there's a way to serve the application direcly, see: https://freehackers.org/thomas/2016/04/17/using-keystone-mitaka-with-gunicorn-and-nginx/

Closing this, as there's nothing Granian can do in this case.

from granian.

vooon avatar vooon commented on August 17, 2024

@gi0baro i managed to run it with custom wrapper (made of the original file):

import sys
import threading
from keystone.server.wsgi import initialize_public_application

application = None
app_lock = threading.Lock()

with app_lock:
    # remove granian options
    sys.argv = [sys.argv[0]]

    if application is None:
        application = initialize_public_application()

Where i can find doc on logging config?

from granian.

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.