-
Notifications
You must be signed in to change notification settings - Fork 25
Rake Commands For Projects
To load a project called “proj-name” with configuration path [ROOT]/project/proj-name:
project:load[proj-name]
Project:load is always non-destructive. Calling project:load on a project that has already been loaded will update the content, style, subjects, and workflows of the project without destroying anything. Primary keys will persist as will classifications and generated subjects. Any new subjects found in the subjects jsons will be added. If the database contains subjects not found in the subjects jsons, those subjects will be marked 'inactive' but not deleted.
For speed, one may wish to skip certain aspects of project load. To only update a specific area of a project, pass the optional AREA param to project:load
:
project:load[proj-name,AREA]
AREA can be any of the following:
-
content
: Update page content, help texts (excluding help text occurring inside workflow jsons), & tutorials -
subjects
: Update groups, sets, subjects (without deleting anything) -
workflows
: Update workflows & tasks
For example, to activate changes one has made to project title, description, or custom pages:
project:load[proj-name,content]
To activate changes made to a Mark task (or anything else task related):
project:load[proj-name,workflows]
After adding several new subjects csvs, to activate the new subjects (without deleting any existing):
project:load[proj-name,subjects]
To clear the database of all projects, subjects, and classifications:
project:drop[proj-name]
Note that, unless the database contains another project, this will completely break the app. This should only be used to remove a project from the database that one no longer needs.
To drop a project (including all classifications and subjects) and completely rebuild it in one call, use the following:
project:reload[proj-name]
##Troubleshooting Stale Data
Note that project and workflows are cached using action_cache. Cache is normally cleared when updates are made to projects and workflows. If you notice a change you made to your project or workflow config isn't reflected on your site - or that your site is completely broken after running project:reload - you may need to issue a host-specific cache purge.
For Heroku, run this locally:
heroku plugins:install https://github.com/heroku/heroku-repo.git
heroku repo:purge_cache -a appname
Next step: Setting up OAuth & Deploying
- Getting Started
-
Setting up your Project
- Setup Your Environment
- Configure your project
- Load your project
- Code & Technical Notes
- Project Reference