Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes log statements. #45

Merged
merged 1 commit into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions plugin_runner/plugin_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
import pathlib
import sys
import traceback

from collections import defaultdict

import grpc
from sandbox import Sandbox

from canvas_sdk.events import Event, EventResponse, EventType
from generated.messages.plugins_pb2 import ReloadPluginsRequest, ReloadPluginsResponse
from generated.services.plugin_runner_pb2_grpc import (
PluginRunnerServicer,
add_PluginRunnerServicer_to_server,
)

from sandbox import Sandbox

from logger import log

ENV = os.getenv("ENV", "development")
Expand Down Expand Up @@ -114,13 +111,13 @@ def load_or_reload_plugin(path: pathlib.Path) -> None:
try:
secrets_json = json.load(secrets_file.open())
except Exception as e:
logging.warn(f'Unable to load secrets for plugin "{name}":', e)
log.warning(f'Unable to load secrets for plugin "{name}": {str(e)}')

# TODO add existing schema validation from Michela here
try:
protocols = manifest_json["components"]["protocols"]
except Exception as e:
log.warning(f'Unable to load plugin "{name}":', e)
log.warning(f'Unable to load plugin "{name}": {str(e)}')
return

for protocol in protocols:
Expand Down
Loading