uwsgi-docs icon indicating copy to clipboard operation
uwsgi-docs copied to clipboard

Overriding Workers

Open hynek opened this issue 8 years ago • 6 comments

The https://github.com/unbit/uwsgi-docs/blob/master/WorkerOverride.rst page has a few problems:

  1. the preamble points to some branch although it’s in uWSGI proper
  2. it’s missing a link from the main page thus impossible to find
  3. could you please document python-worker-override better? Is it possible to pass a callable or something such that the worker doesn’t get instantiated by an import side-effect? that makes it really hard to test.

hynek avatar Mar 20 '16 08:03 hynek

Hello @hynek, be my guest! the first two should be easy to fix with a pull request :)

xrmx avatar Mar 20 '16 13:03 xrmx

Done, it would be nice if someone could fix 3. :)

hynek avatar Mar 20 '16 15:03 hynek

Is the code snippet in https://github.com/unbit/uwsgi-docs/blob/master/WorkerOverride.rst still supposed to work on master? The imported uwsgi module has no sockets attribute. So there is no way of binding the sockets to the server.

mcallistersean avatar Jul 07 '16 16:07 mcallistersean

Did some research and it seems that https://github.com/unbit/uwsgi/commit/ac735e4c3cf2f956a1c26f80577f903fd2f37f4a was never merged, so the example can't possibly work on master branch.

mcallistersean avatar Jul 08 '16 12:07 mcallistersean

@mcallistersean yep, nice catch, i have cherry-picked the commit. Thanks a lot

unbit avatar Jul 13 '16 07:07 unbit

So is the WorkerOverride page describing a correct scenario? Can I override the worker?

ymoran00 avatar Mar 28 '19 09:03 ymoran00