mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
7b5696dc75
* Fix loading of periodic tasks and clean up extension loading. This does a few things: - add tests for extension loading - refactor the extension and periodic task loading - better handle assertions raised by extensions (e.g. when an extension tries to override an already registered view) - attach exception traceback to error log during loading for improved debugging * Use site.addsitedir instead of calling pip. * Use sys.path instead of site.addsitedir and also the setup.py egg_info command.
16 lines
290 B
Python
16 lines
290 B
Python
module_attribute = "hello!"
|
|
|
|
|
|
def extension(app):
|
|
"""This extension will work"""
|
|
return "extension loaded"
|
|
|
|
|
|
def assertive_extension(app):
|
|
"""This extension won't work"""
|
|
assert False
|
|
|
|
|
|
def periodic_task(*args, **kwargs):
|
|
"""This periodic task will successfully load"""
|