Created
May 24, 2016 13:02
-
-
Save samuels410/2555b467e54320ae0bf2dbbc092d3a58 to your computer and use it in GitHub Desktop.
canvas-db-change
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
- Stop delayed jobs (canvas_init stop) | |
- Shut down canvas | |
- Remove the 'queue' section from database.yml | |
- Import the necessary functions from the queue DB into the main one. I have them in a gist here: https://gist.github.com/grahamb/4ac964d9e40de7ca9559. You can also get them by doing a full dump of the queue DB. To import them, save to a file (e.g. functions.sql) and do 'cat functions.sql | psql -h yourdbserverhostname -U canvas canvas_production' (assuming you're using the default username and DB name) | |
- Dump the delayed and failed jobs tables to a file: 'dump -h yourdbserverhostname -U canvas -C -t delayed_jobs -t failed_jobs > jobs.sql' | |
- Import the dump file into the main canvas DB: 'cat jobs.sql | psql -h yourdbserverhostname U canvas canvas_production' | |
- Assuming no errors above, restart delayed jobs (canvas_init start) and Canvas. | |
- Check your delayed jobs log and /jobs to make sure everything is working. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment