Skip to content

fix: avoid retriggering the CONFIG_LOADED action multiple times.#186

Merged
MoisesGSalas merged 1 commit into
mainfrom
mgs/fix-config-load-retrigger
May 28, 2026
Merged

fix: avoid retriggering the CONFIG_LOADED action multiple times.#186
MoisesGSalas merged 1 commit into
mainfrom
mgs/fix-config-load-retrigger

Conversation

@MoisesGSalas
Copy link
Copy Markdown
Member

The get_init_tasks function is called a few times inside the Jinja2 templates. The function used internal Tutor modules to load the user configuration, this caused the CONFIG_LOADED action to trigger hooks multiple times.

Instead of manually load the Tutor configuration using Tutor's internal functions we now rely on the very same CONFIG_LOADED action to register a hook that will store the value of the configuration in a global variable.

@MoisesGSalas MoisesGSalas requested a review from a team as a code owner May 27, 2026 20:17
The get_init_tasks function is called a few times inside the Jinja2
templates. The function used internal Tutor modules to load the user
configuration, this caused the `CONFIG_LOADED` action to trigger hooks
multiple times.

Instead of manually load the Tutor configuration using Tutor's internal
functions we now rely on the very same `CONFIG_LOADED` action to
register a hook that will store the value of the configuration in a
global variable.
@MoisesGSalas MoisesGSalas force-pushed the mgs/fix-config-load-retrigger branch from 2cca1de to 11c7710 Compare May 28, 2026 15:34
@MoisesGSalas MoisesGSalas merged commit 7b38949 into main May 28, 2026
10 checks passed
@MoisesGSalas MoisesGSalas deleted the mgs/fix-config-load-retrigger branch May 28, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants