Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

logout boss tokens on server shutdown #69

Merged
merged 4 commits into from
Mar 11, 2019
Merged

logout boss tokens on server shutdown #69

merged 4 commits into from
Mar 11, 2019

Conversation

jstriebel
Copy link
Contributor

fixes #62

@jstriebel jstriebel self-assigned this Mar 8, 2019
@jstriebel jstriebel requested a review from fm3 March 8, 2019 11:02
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I guess this is to limit the number of sessions on the boss server? Do they have some sort of a limitation there?

await self.http_client.post(url, data=data)
del self.token_infos[key]
except ClientResponseError:
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ClientResponseError harmless enough to just pass? Maybe add some logging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say so. The most common case this will happen will be that the token is expired, which I didn't want to check upfront, but rather simply except here. I'll add a comment to explain this.
Is this fine iyo? I can also add logging, but didn't want to clutter the output with stuff that won't harm too much anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, it’s fine =)

@jstriebel
Copy link
Contributor Author

I don't think there is a session limit, this is rather just to clean up the tokens in the end, as it seems to be good practice. Most of the changes are refactorings anyways, only a couple of lines are actually needed for the logout.

@jstriebel jstriebel merged commit 6cb17ef into master Mar 11, 2019
@jstriebel jstriebel deleted the boss-logout branch March 11, 2019 10:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

improve BOSS token administration
2 participants