Agent should work

This commit is contained in:
2024-10-29 23:57:04 +01:00
parent 17d96cd069
commit 533b9fed6d
24 changed files with 703 additions and 19 deletions

View File

@ -8,6 +8,21 @@
# source code released under the terms of GNU Public License Version 3
# https://www.gnu.org/licenses/gpl-3.0.txt
from ums.utils.const import *
import logging, os
if os.environ.get('SERVE', 'false') == 'true':
logging.basicConfig(
handlers=[
logging.FileHandler(LOG_FILE),
logging.StreamHandler()
],
level=LOG_LEVEL,
format='%(asctime)s %(levelname)s %(name)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
)
logger = logging.getLogger('UMS Agenten')
from ums.utils.types import (
RiddleInformation,
AgentMessage,
@ -20,8 +35,6 @@ from ums.utils.types import (
MessageDbRow
)
from ums.utils.const import *
from ums.utils.request import ManagementRequest
from ums.utils.functions import list_shared_data, list_shared_schema
from ums.utils.functions import list_shared_data, list_shared_schema

View File

@ -13,9 +13,13 @@
See the content ...
"""
import os
import os, logging
BASE_PATH = '/ums-agenten'
SHARE_PATH = os.path.join(BASE_PATH, 'share')
PERSIST_PATH = os.path.join(BASE_PATH, 'persist')
TEMPLATE_PATH = os.path.join(BASE_PATH, 'plattform', 'web', 'templates')
PUBLIC_PATH = os.path.join(BASE_PATH, 'plattform', 'web', 'public')
TEMPLATE_PATH = os.path.join(BASE_PATH, 'plattform', 'web', 'templates')
LOG_FILE = os.path.join(PERSIST_PATH, 'ums.log')
LOG_LEVEL = logging.INFO

View File

@ -1,3 +1,13 @@
# Agenten Plattform
#
# (c) 2024 Magnus Bender
# Institute of Humanities-Centered Artificial Intelligence (CHAI)
# Universitaet Hamburg
# https://www.chai.uni-hamburg.de/~bender
#
# source code released under the terms of GNU Public License Version 3
# https://www.gnu.org/licenses/gpl-3.0.txt
import os
from typing import List, Callable