This repository has been archived by the owner on Nov 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
np-api-server auto exit #1021
Merged
ixje
merged 7 commits into
CityOfZion:development
from
jseagrave21:np-api-server-auto-exit
Sep 30, 2019
Merged
np-api-server auto exit #1021
ixje
merged 7 commits into
CityOfZion:development
from
jseagrave21:np-api-server-auto-exit
Sep 30, 2019
Conversation
This file contains 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
- for all return cases when setting minpeers and maxpeers - for all return cases when opening a wallet
jseagrave21
force-pushed
the
np-api-server-auto-exit
branch
from
September 22, 2019 02:09
cbfd58a
to
282c881
Compare
Can you please include the fix from this #1020 (comment) into your PR? |
Issue 4 can be solved by changing neo-python/neo/bin/api_server.py Line 272 in 5fe7d51
to runner = web.AppRunner(api_server_rpc.app, handle_signals=True) Note: it will not shutdown instantly but will do it asynchronously. We can't seem to control that. It's up to the -edit- |
@ixje will do. Thank you! |
- resolves issue 4 from CityOfZion#1020
- housekeeping
- restore warning in case privatenet database is different from the one you're connecting to (e.g. because you restarted your docker image or single node)
💯 |
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.
What current issue(s) does this address, or what feature is it adding?
Partially addresses #1020, specifically issues 1-3. Now, the program will automatically exit whenever an issue arises when opening a wallet or setting minpeers/maxpeers.
I haven't figured out how to solve issue 4 from #1020.
(-edit-) All issues from #1020 have been addressed thanks to input from @ixje
How did you solve this problem?
I replaced applicable instances of
return
withraise SystemExit
which had precedence for issues settingport-rpc
andport-rest
.How did you make sure your solution works?
Manual testing
Are there any special changes in the code that we should be aware of?
No.
Please check the following, if applicable:
make lint
?make test
?CHANGELOG.rst
? (if not, please do)