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

fix: enable user retirement sink #544

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tutoraspects/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SUPERSET_CONFIG = {
"password": "{{ SUPERSET_LMS_PASSWORD }}",
"email": "{{ SUPERSET_LMS_EMAIL }}",
}
EVENT_SINK_CLICKHOUSE_PII_MODELS = {{ EVENT_SINK_CLICKHOUSE_PII_MODELS }}
EVENT_SINK_CLICKHOUSE_PII_MODELS = {{ EVENT_SINK_PII_MODELS }}
9 changes: 6 additions & 3 deletions tutoraspects/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,13 @@
],
),
(
"EVENT_SINK_CLICKHOUSE_MODELS",
["course_overviews", "user_profile", "external_id"],
"EVENT_SINK_MODELS_ENABLED",
["course_overviews"],
),
(
"EVENT_SINK_PII_MODELS",
["user_profile", "external_id", "auth_user"],
),
("EVENT_SINK_CLICKHOUSE_PII_MODELS", ["user_profile", "external_id"]),
Ian2012 marked this conversation as resolved.
Show resolved Hide resolved
# Turning on this flag will store personally identifiable information
# in the ClickHouse database. Make sure that you understand the legal
# consequences of data storage and privacy before turning this on!
Expand Down
11 changes: 6 additions & 5 deletions tutoraspects/templates/aspects/jobs/init/init-lms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ EOF
./manage.py lms populate_model -f /tmp/erb_config.json -u tutor-contrib-aspects
{% endif %}

{% for model in EVENT_SINK_CLICKHOUSE_MODELS %}
{% if ASPECTS_ENABLE_PII %}
{% for model in EVENT_SINK_MODELS_ENABLED %}
(./manage.py lms waffle_flag --list | grep event_sink_clickhouse.{{model}}.enabled) || ./manage.py lms waffle_flag --create event_sink_clickhouse.{{model}}.enabled --everyone
{% elif model not in EVENT_SINK_CLICKHOUSE_PII_MODELS %}
{% endfor %}

{% if ASPECTS_ENABLE_PII %}
{% for model in EVENT_SINK_PII_MODELS %}
(./manage.py lms waffle_flag --list | grep event_sink_clickhouse.{{model}}.enabled) || ./manage.py lms waffle_flag --create event_sink_clickhouse.{{model}}.enabled --everyone
{% endfor %}
{% endif %}

{% endfor %}