New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make app creating factory async #23
Conversation
As soon as the tests pass let's merge this! |
what about other demos? any plan to make factories there? |
It seems to me that you re-implement what's available in https://pypi.org/project/aio_manager/ (manage.py / argparse wrapper, might be overkill for now) + https://pypi.org/project/aio_yamlconfig/ (reads yaml config, checks it against trafaret schema, saves to app.config), is it your intention to avoid external dependencies? |
@webknjaz We have at least 3 kinds of app start:
So if we want flexible app configuration - what are best practices here? |
I can do that, sure. Do we want other similarities between different demos? |
I'd say priority for config lookup should follow unix-way:
|
@gyermolenko not sure but essential parts should be the same I think like factories, new APIs |
@webknjaz would you like submit PR with your suggestion? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge. Other improvements could be done in separate PRs
@jettify i'll do if i have time |
To be able to run application with gunicorn I made the application creating factory async (fix #10).
Unfortunately I got
unrecognized arguments
error fromso I've also substituted
parse_args
withparse_known_args
as a workaround:Please review
get_config
function usages and parts of logic related to usage ofargv
andget_config(['-c', USER_CONFIG_PATH.as_posix()])
. It looks ugly but I can't find a better way (if we still want command line args).