From 73413baa59e522177574a550093b8d161408e79b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 16 May 2022 22:01:34 +1000 Subject: [PATCH 1/2] Add required imports to plugin.events --- InvenTree/plugin/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/events.py b/InvenTree/plugin/events.py index bea1fafb25..66c6267d53 100644 --- a/InvenTree/plugin/events.py +++ b/InvenTree/plugin/events.py @@ -2,8 +2,10 @@ Import helper for events """ -from plugin.base.event.events import trigger_event +from plugin.base.event.events import process_event, register_event, trigger_event __all__ = [ + 'process_event', + 'register_event', 'trigger_event', ] From 2ed69f638a6ac3dff41a253db165d83f79298a31 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 16 May 2022 22:08:58 +1000 Subject: [PATCH 2/2] Fix error message --- InvenTree/InvenTree/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/tasks.py b/InvenTree/InvenTree/tasks.py index 49a4049be5..a53fd567ab 100644 --- a/InvenTree/InvenTree/tasks.py +++ b/InvenTree/InvenTree/tasks.py @@ -126,8 +126,8 @@ def heartbeat(): try: from django_q.models import Success - logger.info("Could not perform heartbeat task - App registry not ready") except AppRegistryNotReady: # pragma: no cover + logger.info("Could not perform heartbeat task - App registry not ready") return threshold = timezone.now() - timedelta(minutes=30)