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

Improve logic for detecting a connection to the terminology server #6

Open
masnick opened this issue Jul 21, 2021 · 0 comments
Open

Comments

@masnick
Copy link

masnick commented Jul 21, 2021

The current logic is:

  1. Check if GET tx.fhir.org returns 200
  2. If yes, do nothing (which allows for the user to pass in -tx anything.com to change the tx server)
  3. If no, then send -tx n/a to the Java command.

Note that in the case of (3), the user can still provide -tx anything.com, but the Java command will end up being java -jar publisher.jar -ig . -tx n/a -tx anything.com, which causes the publisher to run without a tx server.

I believe the logic should be modified to be the following:

  1. Check if GET captive.apple.com returns 200
  2. If no, send -tx n/a to the Java command and warn the user
  3. If yes:
    1. Check to see if GET $tx_server returns 200. $tx_server is whatever is passed by the user with the -tx option, or the default. (The default should be set as a variable at the top of the script so it's easy for a user to change without mucking around in the logic.)
    2. If no, send -tx n/a to the Java command and warn the user
    3. If yes, send -tx $tx_server to the Java command

The goal of this is to solve the problem of not being able to use an alternate tx server if the default one is completely down. I suggested a simpler fix for this in #5, but that approach fails to check for the tx server being online.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant