-
Notifications
You must be signed in to change notification settings - Fork 0
feat: script to delete photo and video from pohId on user request #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
base: master
Are you sure you want to change the base?
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.
Aren't these user info also pinned in the backup nodes we have? Shouldn't we delete it from there?
delete_poh_user_data.py
Outdated
|
|
||
| # GraphQL endpoint for PoH subgraph | ||
| POH_SUBGRAPH_URL = "https://api.studio.thegraph.com/query/61738/proof-of-humanity-mainnet/version/latest" | ||
| LOG_FILEPATH = "logs/delete_poh_user_data.log" |
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.
We have an env variable for LOG_FILEPATH, please load and use that. We need the logs to be in /var/log/py-kleros-ipfs
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.
Fixed
delete_poh_user_data.py
Outdated
| logger.info(f"Found media CIDs - Photo: {photo_cid}, Video: {video_cid}") | ||
| # Delete files from Filebase | ||
| api = FilebasePinAPI(LOG_FILEPATH) | ||
| bucket_name = "kleros" |
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.
Probably this is a correct bucket, but don't we have a poh-v2 bucket? Shouldn't it be deleted from there?
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.
PohV1 profiles are in the kleros bucket.
Maybe we should check in both, you are right
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.
Fixed
Yes, in the notion page I've defined the steps to unpin from the backup nodes. |
kleros was used by poh-v1, now we are using poh-v2 bucket
|
@Parsa-Darbouy I've included a playbook in order to execute this script in both nodes (redundancy for filebase), but that will delete also the files from the backup nodes. Check the PR https://github.com/kleros/kleros-infrastructure/pull/91/files |
To be used only after the user owner of the profile had formally requested.