mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
temporarily add prints on plugin setup for easier debugging
This commit is contained in:
parent
a9a97c013d
commit
77d3990535
2 changed files with 10 additions and 0 deletions
|
@ -103,6 +103,8 @@ class BaseHook(BaseModel):
|
|||
|
||||
# assert json.dumps(self.model_json_schema(), indent=4), f"Hook {self.hook_module} has invalid JSON schema."
|
||||
|
||||
print(' -', self.hook_module, '.register()')
|
||||
|
||||
# record installed hook in settings.HOOKS
|
||||
settings.HOOKS[self.id] = self
|
||||
|
||||
|
@ -116,6 +118,8 @@ class BaseHook(BaseModel):
|
|||
def ready(self, settings):
|
||||
"""Runs any runtime code needed when AppConfig.ready() is called (after all models are imported)."""
|
||||
|
||||
print(' -', self.hook_module, '.ready()')
|
||||
|
||||
assert self.id in settings.HOOKS, f"Tried to ready hook {self.hook_module} but it is not registered in settings.HOOKS."
|
||||
|
||||
if settings.HOOKS[self.id]._is_ready:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue