mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-06 07:47:53 +10:00
temporarily add prints on plugin setup for easier debugging
This commit is contained in:
@@ -130,6 +130,9 @@ class BasePlugin(BaseModel):
|
||||
if settings is None:
|
||||
from django.conf import settings as django_settings
|
||||
settings = django_settings
|
||||
|
||||
print()
|
||||
print(self.plugin_module_full, '.register()')
|
||||
|
||||
assert json.dumps(self.model_json_schema(), indent=4), f'Plugin {self.plugin_module} has invalid JSON schema.'
|
||||
|
||||
@@ -154,6 +157,9 @@ class BasePlugin(BaseModel):
|
||||
from django.conf import settings as django_settings
|
||||
settings = django_settings
|
||||
|
||||
print()
|
||||
print(self.plugin_module_full, '.ready()')
|
||||
|
||||
assert (
|
||||
self.id in settings.PLUGINS and settings.PLUGINS[self.id]._is_registered
|
||||
), f"Tried to run plugin.ready() for {self.plugin_module} but plugin is not yet registered in settings.PLUGINS."
|
||||
|
||||
Reference in New Issue
Block a user