-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Migration script #399
Migration script #399
Conversation
Pull Request Test Coverage Report for Build 1425
💛 - Coveralls |
tanner/migration_script.py
Outdated
except aioredis.errors.ReplyError: | ||
continue | ||
|
||
self.redis_client.close() |
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.
you have r_client
, not self.redis_client
while testing, I got
You should validate the data before moving it into the postgres |
please consider checking all non-null values
|
Don't forget to set values according to their types too :)
|
@mzfr the problem not only in integer, but in all the types with missing values
|
Is it because of the Float and Integer? |
tanner/migration_script.py
Outdated
|
||
|
||
async def check_session_data(result): | ||
Integers = ["zip_code", "errors", "accepted_paths", "port", "atbr", "rps", "hidden_links"] |
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.
in raw data, there s no atbr and rps,
rps -->requests_in_second
atbr --> approx_time_between_requests
In our system, |
@afeena should I update the code as well as the schema for the postgres? |
@mzfr yes, please go ahead :) |
@mzfr I tested it and found some problems of migration, to make it easier, I will merge this PR and upload the changes as a separate commit :) |
This script can help people in migrating their data from old redis setup to new postgres model.