-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Feat/retention rule] Added ttl rule for sessions #218
Conversation
pyeudiw/storage/mongo_storage.py
Outdated
def set_session_retention_ttl(self, ttl: int | None) -> None: | ||
self._connect() | ||
|
||
if ttl == None: |
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.
None can be expressed as a non existent or False, and we can have it as an int valued to 0 (zero) as well
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.
I made some quick changes in the form of suggestion to be merged by you @PascalDR
at the same time I expect to have in this PR also the settings parameter in the storage section where the ttl value can be configured as well
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
@peppelinux the setting parameter is handled here. Do you want the parameter added to the example configuration? |
…i-wallet-it-python into feat/retention_rule
Si @PascalDR |
* QRCode features (#217) * feat: changed qrcode handling * feat: copied static files from Satosa-saml2spid * feat: modified expiration time handling * fix: update test configuration * fix: remove of connection params * [Feat/retention rule] Added ttl rule for sessions (#218) * feat: added retention rule for session collection * test: added test for retention rule * Update pyeudiw/storage/mongo_storage.py Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it> * Update pyeudiw/storage/mongo_storage.py Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it> * Update pyeudiw/storage/base_storage.py Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it> * chore: added config parameter --------- Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it> * fix: error handling --------- Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it> Co-authored-by: Ghenadie Artic <57416779+Gartic99@users.noreply.github.com>
This PR is relative to issue 33 and adds the ttl rule to the session collection on mongo storage class.