Skip to content
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

Runner Implementation #4

Closed
wants to merge 3 commits into from
Closed

Runner Implementation #4

wants to merge 3 commits into from

Conversation

kellyredding
Copy link
Member

This is the runner class that uses Scmd to run the script and call the callbacks. Pretty straightforward (I hope).

The script now knows the command to copy the dump file from the source
to the target.  This involved commonizing some ssh related settings and
adding in the cmd generation.
This adds a runner class that is responsible for running the script.
Running involves running each phase (dump, copy, restore) and firing
callbacks along the way.  The runner also runs a setup and teardown
that ensures the output dirs for both the source and target are available
when needed and cleaned up when running is complete.
@@ -49,6 +49,34 @@ MysqlFullRestore.new.run

Dumpdb runs the dump commands using source settings and runs the restore commands using target settings. By default, Dumpdb assumes both the dump and restore commands are to be run on the local system.

### Runner Callbacks

Dumpdb supports defining callbacks for your script. These get fired as the script is being run. To define a callback, just define a method named after the callback.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kellyredding - "To define a callback, just define a method named after the callback." this is confusing to me, maybe "method named after the action" or something similar would be more clear?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kellyredding - oh your documentation explains the callbacks later, not so much an issue

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jcredding - yeah, but you are right - that sentence is still confusing.

@jcredding
Copy link
Member

@kellyredding - Runner implementation looks good. 💰 The steps it takes to run a full dump and restore are clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants