mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
chore: add documentation to rake commands
This commit is contained in:
parent
83b426fbc9
commit
934a306b8a
1 changed files with 29 additions and 0 deletions
|
|
@ -1,4 +1,13 @@
|
|||
namespace(:data) do
|
||||
# locally
|
||||
# bundle exec rake data:load_survey_responses
|
||||
|
||||
# on heroku staging environment
|
||||
# heroku run:detached -a mciea-beta bundle exec rake data:load_survey_responses
|
||||
|
||||
# on heroku production environment
|
||||
# heroku run:detached -a mciea-dashboard bundle exec rake data:load_survey_responses
|
||||
|
||||
desc("load survey responses")
|
||||
task(load_survey_responses: :environment) do
|
||||
survey_item_response_count = SurveyItemResponse.count
|
||||
|
|
@ -15,6 +24,17 @@ namespace(:data) do
|
|||
Rails.cache.clear
|
||||
end
|
||||
|
||||
# Usage:
|
||||
# SFTP_PATH=/data/survey_responses/clean/2022_23 bundle exec rake data:load_survey_responses_from_path
|
||||
# You can also swap the order of the commands and environment variables
|
||||
# bundle exec rake data:load_survey_responses_from_path SFTP_PATH=/ecp/data/survey_responses/clean/2024_25
|
||||
|
||||
# on heroku staging environment
|
||||
# heroku run:detached -a mciea-beta SFTP_PATH=/ecp/data/survey_responses/clean/2024_25 bundle exec rake data:load_survey_responses_from_path
|
||||
|
||||
# on heroku production environment
|
||||
# heroku run:detached -a mciea-dashboard SFTP_PATH=/ecp/data/survey_responses/clean/2024_25 bundle exec rake data:load_survey_responses_from_path
|
||||
|
||||
desc("load survey responses from a specific directory")
|
||||
task(load_survey_responses_from_path: :environment) do
|
||||
survey_item_response_count = SurveyItemResponse.count
|
||||
|
|
@ -31,6 +51,15 @@ namespace(:data) do
|
|||
Rails.cache.clear
|
||||
end
|
||||
|
||||
# locally
|
||||
# $ bundle exec rake data:load_admin_data
|
||||
|
||||
# on heroku staging environment
|
||||
# $ heroku run:detached -a mciea-beta bundle exec rake data:load_admin_data
|
||||
|
||||
# on heroku production environment
|
||||
# $ heroku run:detached -a mciea-dashboard bundle exec rake data:load_admin_data
|
||||
|
||||
desc("load admin_data")
|
||||
task(load_admin_data: :environment) do
|
||||
original_count = AdminDataValue.count
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue