MCPcopy Create free account
hub / github.com/WebODM/WebODM / load

Function load

coreplugins/tasknotification/config.py:1–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1def load():
2 from app.plugins.functions import get_current_plugin
3 plugin = get_current_plugin(only_active=True)
4 data_store = plugin.get_global_data_store()
5
6 smtp_configuration = {
7 'smtp_server': data_store.get_string('smtp_server', default=""),
8 'smtp_port': data_store.get_int('smtp_port', default=587),
9 'smtp_username': data_store.get_string('smtp_username', default=""),
10 'smtp_password': data_store.get_string('smtp_password', default=""),
11 'smtp_use_tls': data_store.get_bool('smtp_use_tls', default=False),
12 'smtp_from_address': data_store.get_string('smtp_from_address', default=""),
13 'smtp_to_address': data_store.get_string('smtp_to_address', default=""),
14 'notification_app_name': data_store.get_string('notification_app_name', default=""),
15 'notify_task_completed': data_store.get_bool('notify_task_completed', default=False),
16 'notify_task_failed': data_store.get_bool('notify_task_failed', default=False),
17 'notify_task_removed': data_store.get_bool('notify_task_removed', default=False)
18 }
19 return smtp_configuration
20
21
22def save(data: dict):

Callers

nothing calls this directly

Calls 5

get_current_pluginFunction · 0.90
get_global_data_storeMethod · 0.80
get_stringMethod · 0.80
get_intMethod · 0.80
get_boolMethod · 0.80

Tested by

no test coverage detected