Files
SpecterOps-Nemesis/infra/docker/python_base/dev.Dockerfile
T
Lee Chagolla-Christensen 5de5e23a30 Centralize workflow management and improve resource cleanup
Workflow Client Simplification:
- Removed async_workflow_client.py
- Removed taskhub_client.py
- Renamed set_fastapi_loop to set_workflow_runtime_loop

Workflow Purger Enhancement (+354 lines):
- Added configurable timeout detection for workflows
- Implemented database cursor streaming for batches
- Parallelized Dapr purge operations

Database Schema Changes:
- Added TIMEOUT status to workflow enum

Resource Management Refactor:
- Use AsyncExitStack in lifespan function
- Added cancel_task helper for graceful shutdowns
- Registered cleanup callbacks for automatic teardown

File Enrichment Controller:
- Moved event loop setup before FastAPI
- Extracted health endpoint to separate router

Performance Improvements:
- Changed DPAPI monitor interval: 5s to 30s
- Implemented parallel workflow purge operations
- Added DB cursor for workflow purging
- Removed PID logging

New Features:
- Refactored timeout termination for workflows

Configuration Updates:
- MAX_PARALLEL_WORKFLOWS: 2 to 1 (debug)
- WORKFLOW_CLIENT_LOG_LEVEL: INFO to DEBUG
- Enhanced README debugging instructions for file enrichment
- Disabled structlog timestamp processor

Web API Changes:
- Changed TERMINATED to TIMEOUT in queries
- Updated reporting routes for new status

Infrastructure:
- Added jq and iputils-ping to dev Dockerfile
2025-11-11 23:59:43 -08:00

11 lines
410 B
Docker

# This is the development image for python projects
# It is a slim image with dev tools/programs installed
FROM python:3.12.3-slim
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes \
pipx wget curl procps net-tools htop jq iputils-ping
ENV PATH="/root/.local/bin:${PATH}"
RUN pipx install poetry==2.0.1
RUN pipx inject poetry poetry-plugin-bundle
WORKDIR /src