Skip to content

Commit 5506bb3

Browse files
committed
Merged branch feature/crons-crons into develop
1 parent 66cc97c commit 5506bb3

113 files changed

Lines changed: 6538 additions & 2174 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/adrs/0008.webapi-backend-blend-via-config-global.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ scattering ad hoc rules across `env`, hosting flags, and implicit defaults.
4141

4242
4. **Credentials and URLs**
4343
Provider-specific secrets and connection strings remain in service-level
44-
config (for example `src/webapi/Config.project` and related env). The
44+
config (for example `src/webapi/srv/Config.project` and related env). The
4545
`WEBAPI_*` flags only choose **which** implementation to construct; they do
4646
not replace DSNs, API keys, or database URLs.
4747

infra/self-hosted/compose.yaml

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
name: jupiter
22

3+
x-webapi-cron-env: &webapi-cron-env
4+
SQLITE_DB_URL: ${SQLITE_DB_URL:-sqlite+aiosqlite:////data/jupiter.sqlite}
5+
POSTGRES_DB_URL: ${POSTGRES_DB_URL:-}
6+
ALEMBIC_INI_PATH: ${ALEMBIC_INI_PATH:-../../core/migrations/alembic.sqlite.ini}
7+
ALEMBIC_MIGRATIONS_PATH: ${ALEMBIC_MIGRATIONS_PATH:-../../core/migrations/sqlite}
8+
UNIVERSE: ${UNIVERSE:?Check https://docs.get-thriving.com/how-tos/self-hosting}
9+
ENV: ${ENV:-production}
10+
INSTANCE: ${INSTANCE:?Check https://docs.get-thriving.com/how-tos/self-hosting}
11+
AUTH_TOKEN_SECRET: ${AUTH_TOKEN_SECRET:?Check https://docs.get-thriving.com/how-tos/self-hosting}
12+
WEBAPI_STORAGE_ENGINE: ${WEBAPI_STORAGE_ENGINE:-sqlite}
13+
WEBAPI_TELEMETRY: ${WEBAPI_TELEMETRY:-local}
14+
WEBAPI_SEARCH: ${WEBAPI_SEARCH:-sql}
15+
WEBAPI_CRM: ${WEBAPI_CRM:-noop}
16+
POSTGRES_VERSION: ${POSTGRES_VERSION:-18}
17+
WEBAPI_CRON_EXECUTION_MODE: "run-forever"
18+
19+
x-webapi-cron-service: &webapi-cron-service
20+
restart: always
21+
volumes:
22+
- sqlite_data:/data
23+
depends_on:
24+
webapi-postgres:
25+
condition: service_healthy
26+
required: false
27+
webapi:
28+
condition: service_healthy
29+
330
services:
431
webapi-postgres:
532
profiles:
@@ -27,8 +54,8 @@ services:
2754
environment:
2855
- SQLITE_DB_URL=${SQLITE_DB_URL:-sqlite+aiosqlite:////data/jupiter.sqlite}
2956
- POSTGRES_DB_URL=${POSTGRES_DB_URL:-}
30-
- ALEMBIC_INI_PATH=${ALEMBIC_INI_PATH:-../core/migrations/alembic.sqlite.ini}
31-
- ALEMBIC_MIGRATIONS_PATH=${ALEMBIC_MIGRATIONS_PATH:-../core/migrations/sqlite}
57+
- ALEMBIC_INI_PATH=${ALEMBIC_INI_PATH:-../../core/migrations/alembic.sqlite.ini}
58+
- ALEMBIC_MIGRATIONS_PATH=${ALEMBIC_MIGRATIONS_PATH:-../../core/migrations/sqlite}
3259
- UNIVERSE=${UNIVERSE:?Check https://docs.get-thriving.com/how-tos/self-hosting}
3360
- ENV=${ENV:-production}
3461
- INSTANCE=${INSTANCE:?Check https://docs.get-thriving.com/how-tos/self-hosting}
@@ -54,6 +81,41 @@ services:
5481
interval: 30s
5582
timeout: 10s
5683
retries: 5
84+
webapi-gc-do-all:
85+
<<: *webapi-cron-service
86+
image: ${DOCKER_IMAGE_WEBAPI_GC_DO_ALL:-getthriving/webapi-gc-do-all:${VERSION:-latest}}
87+
environment:
88+
<<: *webapi-cron-env
89+
webapi-gen-do-all:
90+
<<: *webapi-cron-service
91+
image: ${DOCKER_IMAGE_WEBAPI_GEN_DO_ALL:-getthriving/webapi-gen-do-all:${VERSION:-latest}}
92+
environment:
93+
<<: *webapi-cron-env
94+
webapi-schedule-external-sync-do-all:
95+
<<: *webapi-cron-service
96+
image: ${DOCKER_IMAGE_WEBAPI_SCHEDULE_EXTERNAL_SYNC_DO_ALL:-getthriving/webapi-schedule-external-sync-do-all:${VERSION:-latest}}
97+
environment:
98+
<<: *webapi-cron-env
99+
webapi-search-index-backfill-do-all:
100+
<<: *webapi-cron-service
101+
image: ${DOCKER_IMAGE_WEBAPI_SEARCH_INDEX_BACKFILL_DO_ALL:-getthriving/webapi-search-index-backfill-do-all:${VERSION:-latest}}
102+
environment:
103+
<<: *webapi-cron-env
104+
webapi-search-mutation-log-drain-do-all:
105+
<<: *webapi-cron-service
106+
image: ${DOCKER_IMAGE_WEBAPI_SEARCH_MUTATION_LOG_DRAIN_DO_ALL:-getthriving/webapi-search-mutation-log-drain-do-all:${VERSION:-latest}}
107+
environment:
108+
<<: *webapi-cron-env
109+
webapi-search-mutation-log-processing-requeue-do-all:
110+
<<: *webapi-cron-service
111+
image: ${DOCKER_IMAGE_WEBAPI_SEARCH_MUTATION_LOG_PROCESSING_REQUEUE_DO_ALL:-getthriving/webapi-search-mutation-log-processing-requeue-do-all:${VERSION:-latest}}
112+
environment:
113+
<<: *webapi-cron-env
114+
webapi-stats-do-all:
115+
<<: *webapi-cron-service
116+
image: ${DOCKER_IMAGE_WEBAPI_STATS_DO_ALL:-getthriving/webapi-stats-do-all:${VERSION:-latest}}
117+
environment:
118+
<<: *webapi-cron-env
57119
api:
58120
environment:
59121
- UNIVERSE=${UNIVERSE:?Check https://docs.get-thriving.com/how-tos/self-hosting}

itests/api/big_plans.test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ def test_api_big_plan_create_inbox_task_visible_in_inbox(
452452
timeout=10,
453453
)
454454

455-
print(create_response.status_code)
456-
print(create_response.content)
457-
458455
assert create_response.status_code == 200
459456
created_ref_id = create_response.json()["new_inbox_task"]["ref_id"]
460457

itests/package.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ hide = true
8787
run = """
8888
#!/usr/bin/env bash
8989
set -e -o pipefail
90-
cd src/webapi
90+
cd src/webapi/srv
9191
uv run pip-audit --disable-pip -r <(uv export --format requirements.txt --all-groups)
9292
"""
9393

0 commit comments

Comments
 (0)