Skip to content
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

Upgrade test-client when switching from FBThrift to Apache Thrift #4

Open
spladug opened this issue Jan 13, 2020 · 0 comments
Open

Comments

@spladug
Copy link
Contributor

spladug commented Jan 13, 2020

The old script looked like

#!/bin/sh

# this is a wrapper around the simple command line client the thrift compiler
# generates for this service. it assumes the server is running locally on port
# 9100. run it to see more usage details.
exec python3 -m my_service.my_service_thrift.remote -h localhost:9000 "$@"

but the remote moved and got a little messier so should now look like

#!/bin/sh

# this is a wrapper around the simple command line client the thrift compiler
# generates for this service. it assumes the server is running locally on port
# {{ cookiecutter.port }} as in the OneVM. run it to see more usage details.
if [ "$#" -gt 0 ]; then
    exec my_service/my_service_thrift/MyService-remote -h localhost:9000 "$@"
else
    # we need to pass exactly 0 args to get docs. the -h with nothing else
    # causes a crash.
    exec my_service/my_service_thrift/MyService-remote -h localhost:9000
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant