mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-16 10:05:18 +00:00
60a5f25c9b
Environment was not updated correctly on `tutor plugins enable ...` because of a caching issue. To bypass this issue, we improve the caching mechanism and introduce a new `lru_cache` decorator. Close #989.
33 lines
754 B
ReStructuredText
33 lines
754 B
ReStructuredText
.. _hooks_api:
|
|
|
|
=========
|
|
Hooks API
|
|
=========
|
|
|
|
Types
|
|
=====
|
|
|
|
This is the Python documentation of the two types of hooks (actions and filters) as well as the contexts system which is used to instrument them. Understanding how Tutor hooks work is useful to create plugins that modify the behaviour of Tutor. However, plugin developers should almost certainly not import these hook types directly. Instead, use the reference :ref:`hooks catalog <hooks_catalog>`.
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
actions
|
|
filters
|
|
contexts
|
|
|
|
Utilities
|
|
=========
|
|
|
|
Functions
|
|
---------
|
|
|
|
.. autofunction:: tutor.core.hooks::clear_all
|
|
.. autofunction:: tutor.hooks::lru_cache
|
|
|
|
Priorities
|
|
----------
|
|
|
|
.. automodule:: tutor.core.hooks.priorities
|
|
:members: HIGH, DEFAULT, LOW
|