Add job processing system with streaming endpoint

Introduced a `processing` router to handle job streaming using server-sent events. Added `Jobs` and `JobStatus` models for managing job-related data, along with database creation logic. Updated the `sample` router to create new job entries during experiment creation.
This commit is contained in:
GotthardG 2025-04-10 14:02:19 +02:00
parent 14d23cdc96
commit 3ae1de12b2

View File

@ -57,17 +57,24 @@ release:
stage: release stage: release
when: manual when: manual
variables: variables:
TWINE_USERNAME: gitlab-ci-token # Keep username the same TWINE_USERNAME: gitlab-ci-token
TWINE_PASSWORD: $CI_JOB_TOKEN # Use PAT stored in GitLab CI/CD Variables TWINE_PASSWORD: $CI_JOB_TOKEN
script: script:
- echo "Setting up Python dependencies..." # build and run commands within docker container context
- source $VIRTUAL_ENV/bin/activate - docker-compose build backend
- pip install -r requirements.txt
- mkdir -p /app/backend/ssl # Run commands inside your 'backend' service container
- rm -f openapi.json || true - docker-compose run --rm backend mkdir -p /app/backend/ssl
- rm -rf python-client || true - docker-compose run --rm backend bash make_openapi_client.sh
- bash make_openapi_client.sh # Generate OpenAPI client and package
- ls backend/python-client/dist/ # Debug artifacts to ensure files exist # After script finishes execution within the container,
# revert to the runner environment context if needed
# Assuming 'python-client' is generated and mounted correctly,
# subsequent twine commands must be run out of the container
- ls backend/python-client/dist/ # Ensure files exist
# install further publishing requirements outside of docker
- pip install --upgrade build setuptools wheel twine - pip install --upgrade build setuptools wheel twine
- twine check backend/python-client/dist/* - twine check backend/python-client/dist/*
- twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi backend/python-client/dist/* - twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi backend/python-client/dist/*