forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: backport event bus configuration
- Loading branch information
1 parent
1244a9f
commit 8a3ccb7
Showing
4 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5418,6 +5418,13 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring | |
def _should_send_certificate_events(settings): | ||
return settings.FEATURES['SEND_LEARNING_CERTIFICATE_LIFECYCLE_EVENTS_TO_BUS'] | ||
|
||
|
||
#### Event bus #### | ||
EVENT_BUS_PRODUCER = "edx_event_bus_redis.create_producer" | ||
EVENT_BUS_CONSUMER = "edx_event_bus_redis.RedisEventConsumer" | ||
EVENT_BUS_REDIS_CONNECTION_URL = "redis://:[email protected]:6379/" | ||
EVENT_BUS_TOPIC_PREFIX = "dev" | ||
|
||
#### Event bus producing #### | ||
# .. setting_name: EVENT_BUS_PRODUCER_CONFIG | ||
# .. setting_default: all events disabled | ||
|
@@ -5491,11 +5498,36 @@ def _should_send_certificate_events(settings): | |
'course-authoring-xblock-lifecycle': | ||
{'event_key_field': 'xblock_info.usage_key', 'enabled': False}, | ||
}, | ||
"org.openedx.learning.course.grade.now.passed.v1": { | ||
"learning-badges-lifecycle": { | ||
"event_key_field": "user_course_data.course.course_key", | ||
"enabled": True, | ||
}, | ||
}, | ||
"org.openedx.learning.course.grade.now.failed.v1": { | ||
"learning-badges-lifecycle": { | ||
"event_key_field": "user_course_data.course.course_key", | ||
"enabled": True, | ||
}, | ||
}, | ||
} | ||
derived_collection_entry('EVENT_BUS_PRODUCER_CONFIG', 'org.openedx.learning.certificate.created.v1', | ||
'learning-certificate-lifecycle', 'enabled') | ||
derived_collection_entry('EVENT_BUS_PRODUCER_CONFIG', 'org.openedx.learning.certificate.revoked.v1', | ||
'learning-certificate-lifecycle', 'enabled') | ||
|
||
# If the consumer encounters this many consecutive errors, exit with an error. This is intended to be used in a context where a management system (such as Kubernetes) will relaunch the consumer automatically. | ||
#EVENT_BUS_REDIS_CONSUMER_CONSECUTIVE_ERRORS_LIMIT (defaults to None) | ||
|
||
# How long the consumer should wait for new entries in a stream. | ||
# As we are running the consumer in a while True loop, changing this setting doesn't make much difference | ||
# expect for changing number of monitoring messages while waiting for new events. | ||
# https://redis.io/commands/xread/#blocking-for-data | ||
#EVENT_BUS_REDIS_CONSUMER_POLL_TIMEOUT (defaults to 60 seconds) | ||
|
||
# Limits stream size to approximately this number | ||
#EVENT_BUS_REDIS_STREAM_MAX_LEN (defaults to 10_000) | ||
|
||
BEAMER_PRODUCT_ID = "" | ||
|
||
#### Survey Report #### | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,3 +90,5 @@ | |
# django42 support PR merged but new release is pending. | ||
# https://github.com/openedx/edx-platform/issues/33431 | ||
-e git+https://github.com/anupdhabarde/edx-proctoring-proctortrack.git@31c6c9923a51c903ae83760ecbbac191363aa2a2#egg=edx_proctoring_proctortrack | ||
-e git+https://github.com/raccoongang/[email protected]#egg=openedx_events | ||
git+https://github.com/openedx/[email protected] |