Skip to content
Snippets Groups Projects
Commit 2a85e033 authored by Tim Repke's avatar Tim Repke
Browse files

Merge branch 'master' into 'production'

Master

See merge request !27
parents 5cb126e9 43da5443
No related branches found
No related tags found
1 merge request!27Master
Pipeline #1174 failed
......@@ -2,7 +2,7 @@ NACSOS_LOG_CONF_FILE="config/logging.toml"
NACSOS_SERVER__HOST="localhost"
NACSOS_SERVER__PORT=8081
NACSOS_SERVER__CORS_ORIGINS='["http://localhost:8080", "http://127.0.0.1:8080", "http://localhost:8081", "http://localhost:8082","http://localhost", "http://0.0.0.0:8081", "http://0.0.0.0", "http://127.0.0.1:8081", "http://127.0.0.1"]'
NACSOS_SERVER__CORS_ORIGINS='["http://localhost:8080","http://localhost:8000", "http://127.0.0.1:8080", "http://localhost:8081", "http://localhost:8082","http://localhost", "http://0.0.0.0:8081", "http://0.0.0.0", "http://127.0.0.1:8081", "http://127.0.0.1"]'
NACSOS_SERVER__HEADER_CORS=true
NACSOS_DB__HOST="localhost"
......
......@@ -3,7 +3,7 @@ from fastapi import APIRouter, Depends
from nacsos_data.models.imports import ImportModel, ImportType
from nacsos_data.db.crud.imports import \
read_import, \
upsert_import,\
upsert_import, \
delete_import, \
read_all_imports_for_project, \
read_item_count_for_import
......@@ -64,10 +64,12 @@ async def trigger_import(import_id: str,
if import_details.type == ImportType.jsonl:
return await submit_jsonl_import_task(import_id=import_id,
base_url=settings.PIPES.API_URL,
auth_token=settings.PIPES.TOKEN,
engine=db_engine)
elif import_details.type == ImportType.wos:
return await submit_wos_import_task(import_id=import_id,
base_url=settings.PIPES.API_URL,
auth_token=settings.PIPES.TOKEN,
engine=db_engine)
else:
raise NotImplementedError(f'No import trigger for "{import_details.type}" implemented yet.')
......
......@@ -97,6 +97,9 @@ class UsersConfig(BaseModel):
class PipelinesConfig(BaseModel):
API_URL: str = 'http://localhost:8000/api'
USERNAME: str | None = None
USER_ID: str | None = None
TOKEN: str | None = None
class Settings(BaseSettings):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment