This repository was archived by the owner on Sep 26, 2022. It is now read-only.
Pick WSGI server to run the API#196
Merged
sr-gi merged 5 commits intotalaia-labs:split-cli-clientfrom Aug 20, 2020
Merged
Conversation
a00f927 to
e0492d8
Compare
The API can be run either using gunicorn (default) or Flask webserver. The later is not recomended for production cases, but may be enough if the tower only used by yourself
e0492d8 to
f3ea880
Compare
30b5518 to
4ddb5d2
Compare
bigspider
reviewed
Aug 19, 2020
bigspider
reviewed
Aug 19, 2020
bigspider
reviewed
Aug 19, 2020
bigspider
suggested changes
Aug 19, 2020
Collaborator
bigspider
left a comment
There was a problem hiding this comment.
No major comment, apart from a typo that breaks the --wsgi argument.
Python 3.8 processes are created using spawn for MacOS instead of fork (which use to be the default). The previous version of the code was passing some data that cannot be serialised (pickled) when spawn is used, so it needed to be reworked. Forcing fork instead of spawn may have also worked, but Windows does not support it, so the old version of the code would have failed on Windows anyway.
e7f8a43 to
54e7f24
Compare
Member
Author
|
This should be working now. Happened to find an issue regarding python 3.8 and MacOS that extended to Windows also. It should work with versions prior to 3.8 and 3.8 onwards with the current version. |
bigspider
approved these changes
Aug 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gunicornis used as the WSGI server to run the api by default, however, in other setups it may make sense using something different:uWSGImay be an alternative.This PR adds the config parameters needed to allow the customisation of the WSGI server and adapt the daemon to run it.
partially covers #191 (not covers
uWSGIfor Windows environments, will leave as a followup since I cannot tests it personally).This also fixes the issue with
e2etesting leaving thegunicornrunning. End-to-end test switched back to useflasknow there's an option for it.