-
Notifications
You must be signed in to change notification settings - Fork 288
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
Support dump and load bytes and add back up limit #207
Conversation
fatanugraha
commented
May 3, 2023
•
edited
Loading
edited
- Added support to back up and restore bytes data.
- Added new flags to stop the backup process after reached certain limit.
dynamodump/dynamodump.py
Outdated
if isinstance(obj, bytes): | ||
return base64.b64encode(obj).decode("utf-8") | ||
|
||
return json.JSONEncoder.encoder(self, ob) |
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.
return json.JSONEncoder.encoder(self, ob) | |
return json.JSONEncoder.encoder(self, obj) |
I think there is a typo here.
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.
Thanks for pointing this out, not sure why this passed my manual testing in the past 🤔
dynamodump/dynamodump.py
Outdated
@@ -1241,6 +1263,9 @@ def main(): | |||
parser.add_argument( | |||
"--log", help="Logging level - DEBUG|INFO|WARNING|ERROR|CRITICAL [optional]" | |||
) | |||
parser.add_argument( | |||
"--limit", help="Limit option for backup, will stop the back up process after number of backed up items exceeded the limit [optional]", type=int |
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.
Could you please replace exceeded
with reaches
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.
Done!
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.
@fatanugraha thanks for the PR! Could you please resolve the linting issue picked up by CI 🙂
Kudos, SonarCloud Quality Gate passed! |
Ah apologies, I missed out flake8 lint issues. Pushed the change 🙇 |
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.
Thanks @fatanugraha