Compare commits

..

2 Commits

Author SHA1 Message Date
lebaudantoine fe59f97414 wip 2026-10-01 18:01:48 +02:00
lebaudantoine c9dba534b8 wip s3 checksum 2026-10-01 17:56:48 +02:00
8 changed files with 34 additions and 9 deletions
+3 -2
View File
@@ -37,13 +37,14 @@ RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-dev
# ---- mails ----
FROM node:22-alpine AS mail-builder
FROM node:22 AS mail-builder
COPY ./src/mail /mail/app
WORKDIR /mail/app
RUN npm ci --ignore-scripts && npm run build
RUN yarn install --frozen-lockfile && \
yarn build
# ---- static link collector ----
+2 -2
View File
@@ -172,7 +172,7 @@ services:
working_dir: /app
node:
image: node:22-alpine
image: node:22
user: "${DOCKER_USER:-1000}"
environment:
HOME: /tmp
@@ -271,7 +271,7 @@ services:
- /app/.venv
redis-summary:
image: redis:5
image: redis
ports:
- "6379:6379"
+2
View File
@@ -401,6 +401,8 @@ def _get_s3_client(*, override_domain: bool = True):
config=botocore.client.Config(
region_name=settings.AWS_S3_REGION_NAME,
signature_version=settings.AWS_S3_SIGNATURE_VERSION,
request_checksum_calculation=settings.AWS_REQUEST_CHECKSUM_CALCULATION,
response_checksum_validation=settings.AWS_RESPONSE_CHECKSUM_VALIDATION,
),
)
return default_storage.connection.meta.client
+2 -2
View File
@@ -1,5 +1,5 @@
#!/bin/sh
set -e
#!/usr/bin/env bash
set -eo pipefail
# Run html-to-text to convert all html files to text files
DIR_MAILS="../backend/core/templates/mail/"
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Run mjml command to convert all mjml templates to html files
DIR_MAILS="../backend/core/templates/mail/html/"
+2 -2
View File
@@ -9,8 +9,8 @@
},
"private": true,
"scripts": {
"build-mjml-to-html": "sh ./bin/mjml-to-html",
"build-html-to-plain-text": "sh ./bin/html-to-plain-text",
"build-mjml-to-html": "bash ./bin/mjml-to-html",
"build-html-to-plain-text": "bash ./bin/html-to-plain-text",
"build": "npm run build-mjml-to-html && npm run build-html-to-plain-text"
},
"volta": {
+20
View File
@@ -442,6 +442,19 @@ def call_webhook_v2_task(
payload=webhook_payload_adapter.validate_python(payload), tenant_id=tenant_id
)
MOCK_TRANSCRIPT_JSON = """
{
"segments": [
{"start": 0.0, "end": 0.9, "text": "Bonjour à tous.", "speaker": "SPEAKER_00"}
],
"word_segments": [
{"word": "Bonjour", "start": 0.0, "end": 0.42, "score": 0.98},
{"word": "à", "start": 0.45, "end": 0.52, "score": 0.95},
{"word": "tous.", "start": 0.55, "end": 0.9, "score": 0.97}
]
}
"""
@celery.task(
bind=True,
@@ -474,6 +487,13 @@ def process_audio_transcribe_v2_task(
job_id = self.request.id
transcription_res = WhisperXResponse.model_validate_json(MOCK_TRANSCRIPT_JSON)
file_service.store_transcript(
transcript=transcription_res,
job_id=job_id,
)
try:
transcription_res = WhisperXResponse(
**transcribe_audio( # type: ignore
+2
View File
@@ -84,6 +84,8 @@ class Settings(BaseSettings):
aws_s3_secret_access_key: SecretStr
aws_s3_secure_access: bool = True
aws_s3_region_name: str | None = None
aws_request_checksum_calculation: str = "when_required"
aws_response_checksum_validation: str = "when_required"
aws_transcript_path: str = "transcripts"
aws_summary_path: str = "summaries"