-
Notifications
You must be signed in to change notification settings - Fork 51
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
add a few more cast types using character varying #29
base: master
Are you sure you want to change the base?
Conversation
update_tables.import_table(table) | ||
update_tables.import_table(table) | ||
rescue StandardError => e | ||
retry unless retries += 1 < 3 |
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.
Shouldn't this be retry if retries += 1 < 3
?
Can you also log the error?
@@ -22,11 +22,17 @@ def self.update_tables | |||
update_tables = PostgresToRedshift.new | |||
|
|||
update_tables.tables.each do |table| | |||
target_connection.exec("CREATE TABLE IF NOT EXISTS #{schema}.#{target_connection.quote_ident(table.target_table_name)} (#{table.columns_for_create})") | |||
begin | |||
retries ||= 3 |
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.
Can you make this configurable, and default to 1?
Looks good, can you fix the build? Looks like it just needs another bundle install, or the Gemfile itself is out of date. |
add a few more types.