These are the code examples referenced in our blog post Our Plan for Zero-Downtime Database Transitions with Rails: Part 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'doc_raptor' | |
TEN_SECONDS = 10 | |
FIVE_MINUTES = 300 | |
DocRaptor.api_key "YOUR_API_KEY_HERE" | |
pdf_html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en"><body><a href="http://google.com">google</a></body></html>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Estimated total time to execute: 2hr not including pre-replication | |
Ensure performance test make_doc script has production endpoint | |
Comment out deploys tests, DO NOT COMMIT | |
Setup SSH tunnel between AWS background-001 to Linode MySQL | |
Replicate Linode MySQL to AWS (3hr+) as docraptor-production | |
One-time copy non-queue Redis data | |
Verify AWS endpoint working | |
./script/service_test http://aws.docraptor.com && ./script/service_test https://aws.docraptor.com |