-
Notifications
You must be signed in to change notification settings - Fork 3
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
Flag broken updater on every refresh attempt #150
Conversation
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.
Both this PR and Uninett/zinolib#71 address only a second part of Uninett/zinolib#68. The first part concerns EventManager
and it is not fixed yet. So make sure that merging those two will not close Uninett/zinolib#68.
Also see RFC below
This I do not understand. Issue #68 is two different problems. |
If you merge this PR then Uninett/zinolib#68 will be automatically closed. See your first comment (PR description) here. Change "Closes #XXX" to "For #XXX" so that GitHub does not close Uninett/zinolib#68 automatically |
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.
Looks much better now, see a question below
while True: | ||
if current_app.updater is None: | ||
try: | ||
connect_to_updatehandler() | ||
except NotConnectedError as e: | ||
raise LostConnectionError("Could not establish connection to UpdateHandler") from e | ||
updated = current_app.updater.get_event_update() |
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.
while True: | |
if current_app.updater is None: | |
try: | |
connect_to_updatehandler() | |
except NotConnectedError as e: | |
raise LostConnectionError("Could not establish connection to UpdateHandler") from e | |
updated = current_app.updater.get_event_update() | |
while True: | |
if current_app.updater is None: | |
try: | |
connect_to_updatehandler() | |
except NotConnectedError as e: | |
raise LostConnectionError("Could not establish connection to UpdateHandler") from e | |
updated = current_app.updater.get_event_update() |
Is there a specific reason why current_app.updater is None
-check should be run on every iteration? Could be moved to before the while
-loop instead
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.
It used to be before the while loop but that was not sufficient, the connection can be lost during the loop!
For Uninett/zinolib#68 together with Uninett/zinolib#71