Skip to content

Commit

Permalink
New Cron and Syntax error (project-sunbird#3479)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwiniev95 authored Sep 2, 2022
1 parent 8965ced commit 7a5a3a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/ml-analytics-service/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ml_analytics_AWS_access_key: "{{ ml_AWS_access_key | default('') }}"
ml_analytics_AWS_secret_access_key: "{{ ml_AWS_secret_access_key | default('') }}"
ml_analytics_AWS_region_name: "{{ ml_AWS_region_name | default('') }}"
ml_analytics_AWS_bucket_name: "{{ ml_AWS_bucket_name | default('') }}"
ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec : : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/projects/distinctCountPrglevel/ml_projects_distinctCount_prgmlevel.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-programLevel-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
ml_analytics_druid_distinctCnt_prglevel_projects_status_injestion_spec : '{"type":"index","spec":{"ioConfig":{"type":"index","inputSource":{"type":"azure","uris":["azure://telemetry-data-store/projects/distinctCountPrglevel/ml_projects_distinctCount_prgmlevel.json"]},"inputFormat":{"type":"json"}},"tuningConfig":{"type":"index","partitionsSpec":{"type":"dynamic"}},"dataSchema":{"dataSource":"ml-project-programLevel-status","granularitySpec":{"type":"uniform","queryGranularity":"none","rollup":false,"segmentGranularity":"DAY"},"timestampSpec":{"column":"time_stamp","format":"auto"},"dimensionsSpec":{"dimensions":[{"type":"string","name":"program_name"},{"type":"string","name":"program_id"},{"type":"string","name":"status_of_project"},{"type":"string","name":"state_name"},{"type":"string","name":"state_externalId"},{"type":"string","name":"private_program"},{"type":"string","name":"project_created_type"},{"type":"string","name":"parent_channel"},{"type":"long","name":"unique_projects"},{"type":"long","name":"unique_users"},{"type":"long","name":"no_of_imp_with_evidence"},{"type":"string","name":"time_stamp"}]},"metricsSpec":[]}}}'
ml_analytics_projects_distinctCnt_prglevel_output_dir: "{{ WORKDIR }}/source/projects/distinctCountPrglevel/output"
ml_analytics_projects_distinctCnt_prglevel_azure_blob_path: "projects/distinctCountPrglevel/"
ml_analytics_survey_status_output_dir : "{{ WORKDIR }}/source/survey/status/output"
Expand Down
11 changes: 10 additions & 1 deletion ansible/roles/ml-analytics-service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,19 @@
- faust_survey.service
- faust_survey_evidence.service

- name: CREATE THE CRON
- name: CREATE THE CRON BATCH INGESTION
cron:
name: "Run Batch Ingestion Job"
user: "{{ USER }}"
minute: "30"
hour: "18"
job: "{{ BASEPATH }}/ml-analytics-service/run.sh > {{ BASEPATH }}/ml-analytics-service/crontab_job.log"

- name: CREATE THE CRON NVSK Data Upload
cron:
name: "NVSK Data Upload JOB"
user: "{{ USER }}"
minute: "30"
hour: "7"
weekday: "4"
job: "{{ BASEPATH }}/run_weekly.sh > {{ BASEPATH }}/ml-analytics-service/nvsk_data_weekly.logs"

0 comments on commit 7a5a3a3

Please sign in to comment.