Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Improve and refactor entrypoint to make
--workers
and `--threa…
…ds` argument working (#7) * fix: Improve and refacor entrypoint to make `--workers` and `--threads` argument working * The app_server took the entrpoint from _app.yaml_, which has mostly set this property. So the default value of `appYaml.get("entrypoint")` was actually never used. But the entrypoint in _app.yaml_ cannot have a `$WORKER` or `$THREADS` variable -- they don't exist in gcloud (https://cloud.google.com/appengine/docs/standard/python3/runtime#environment_variables) So the variables were never replaced, because they dont't exist. That made the `--worker` and `--thread` argument of the app_server useless. * Now we remove these argument always from the provides entrypoint and re-add it with the values from our argparse. This get the arguemnts working. * Furthermore I added an option to provide an custom entrypoint, if the entrypoint is set in the _app.yaml_, but should be different for the local server. Setting this through the subprocess-call in the viur-cli is a little bit tricky, but with double quoting it works. * I (and PyCharm ^^) refactored this code a bit and add some type hints. * refactor: Do some more refactorings * refactor: Do some more refactorings
- Loading branch information