bazis-async-background 2.2.0__tar.gz → 2.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/PKG-INFO +19 -11
  2. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/README.md +18 -10
  3. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/_version.py +3 -3
  4. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/conf.py +2 -2
  5. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis_async_background.egg-info/PKG-INFO +19 -11
  6. bazis_async_background-2.2.2/sample/Dockerfile +45 -0
  7. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/demo/router.py +1 -1
  8. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/demo/tasks.py +1 -1
  9. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/docker-compose.test.yml +2 -11
  10. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/pyproject.toml +1 -1
  11. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/test.env +2 -2
  12. bazis_async_background-2.2.0/sample/Dockerfile +0 -26
  13. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/.dockerignore +0 -0
  14. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/.github/workflows/build-publish.yml +0 -0
  15. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/.github/workflows/update-licenses.yml +0 -0
  16. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/.gitignore +0 -0
  17. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/__init__.py +0 -0
  18. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/apps.py +0 -0
  19. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/broker.py +0 -0
  20. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/management/__init__.py +0 -0
  21. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/management/commands/__init__.py +0 -0
  22. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/management/commands/kafka_consumer_multiple.py +0 -0
  23. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/management/commands/kafka_consumer_single.py +0 -0
  24. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/producer.py +0 -0
  25. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/router.py +0 -0
  26. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/routes.py +0 -0
  27. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/schemas.py +0 -0
  28. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis/contrib/async_background/utils.py +0 -0
  29. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis_async_background.egg-info/SOURCES.txt +0 -0
  30. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis_async_background.egg-info/dependency_links.txt +0 -0
  31. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis_async_background.egg-info/requires.txt +0 -0
  32. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/bazis_async_background.egg-info/top_level.txt +0 -0
  33. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/pyproject.toml +0 -0
  34. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/pytest.ini +0 -0
  35. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/demo/__init__.py +0 -0
  36. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/demo/schemas.py +0 -0
  37. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/manage.py +0 -0
  38. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/project.env +0 -0
  39. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/sample/__init__.py +0 -0
  40. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/sample/main.py +0 -0
  41. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/sample/router.py +0 -0
  42. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/sample/settings.py +0 -0
  43. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/sample/urls.py +0 -0
  44. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/sample/sample/wsgi.py +0 -0
  45. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/setup.cfg +0 -0
  46. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/tests/conftest.py +0 -0
  47. {bazis_async_background-2.2.0 → bazis_async_background-2.2.2}/tests/test_demo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bazis-async-background
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Async Background core framework for Bazis.
5
5
  Author-email: Ilya Kharyn <ilya.tt07@gmail.com>
6
6
  Maintainer-email: Ilya Kharyn <ilya.tt07@gmail.com>
@@ -39,15 +39,15 @@ Core background task framework for Bazis. It provides Kafka broker helpers, task
39
39
  # Install the package
40
40
  uv add bazis-async-background
41
41
 
42
- # Configure environment variables / settings
43
- INSTALLED_APPS='["bazis.contrib.async_background", ...]'
44
- BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
42
+ # Configure environment variables / settings (.env uses BS_ prefix)
43
+ BS_INSTALLED_APPS='["bazis.contrib.async_background", ...]'
44
+ BS_BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
45
45
 
46
46
  # Kafka settings
47
- KAFKA_BOOTSTRAP_SERVERS=localhost:9093
48
- KAFKA_TOPIC_ASYNC_REQUEST=my_app_background_tasks
49
- KAFKA_GROUP_ID=my_app_background
50
- KAFKA_TASKS='["my_app.background.tasks"]'
47
+ BS_KAFKA_BOOTSTRAP_SERVERS=localhost:9093
48
+ BS_KAFKA_TOPIC_ASYNC_BG=my_app_background_tasks
49
+ BS_KAFKA_GROUP_ID=my_app_background
50
+ BS_KAFKA_TASKS='["my_app.background.tasks"]'
51
51
 
52
52
  # Run consumer in Kubernetes
53
53
  python manage.py kafka_consumer_single
@@ -158,7 +158,7 @@ This waits for the pytest container to finish and streams logs only from the Pyt
158
158
 
159
159
  ### Environment Variables / Settings
160
160
 
161
- Add to your `.env` or `settings.py`:
161
+ Add to your `.env` (use `BS_` prefix for Bazis settings) or `settings.py`:
162
162
 
163
163
  ```bash
164
164
  # Required settings
@@ -168,7 +168,7 @@ KAFKA_TASKS='["my_app.background.tasks"]'
168
168
 
169
169
  # Kafka settings
170
170
  KAFKA_BOOTSTRAP_SERVERS=localhost:9093
171
- KAFKA_TOPIC_ASYNC_REQUEST=my_app_background_tasks
171
+ KAFKA_TOPIC_ASYNC_BG=my_app_background_tasks
172
172
  KAFKA_GROUP_ID=my_app_background
173
173
 
174
174
  # Optional settings
@@ -180,11 +180,19 @@ KAFKA_AUTO_COMMIT_INTERVAL_MS=5000
180
180
  KAFKA_LOG_LEVEL=INFO
181
181
  ```
182
182
 
183
+ When placing these in a `.env` file, prefix them with `BS_`, for example:
184
+
185
+ ```bash
186
+ BS_INSTALLED_APPS='["bazis.contrib.async_background", ...]'
187
+ BS_BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
188
+ BS_KAFKA_TASKS='["my_app.background.tasks"]'
189
+ ```
190
+
183
191
  **Parameters**:
184
192
 
185
193
  - `KAFKA_TASKS` — dotted module paths imported by the consumer to register tasks
186
194
  - `KAFKA_BOOTSTRAP_SERVERS` — Kafka broker address
187
- - `KAFKA_TOPIC_ASYNC_REQUEST` — topic for async tasks
195
+ - `KAFKA_TOPIC_ASYNC_BG` — topic for async tasks
188
196
  - `KAFKA_GROUP_ID` — consumer group
189
197
  - `KAFKA_CONSUMER_LIFETIME_SEC` — consumer working time before restart
190
198
  - `KAFKA_CONSUMER_LIFETIME_JITTER_SEC` — random deviation to avoid simultaneous restart
@@ -12,15 +12,15 @@ Core background task framework for Bazis. It provides Kafka broker helpers, task
12
12
  # Install the package
13
13
  uv add bazis-async-background
14
14
 
15
- # Configure environment variables / settings
16
- INSTALLED_APPS='["bazis.contrib.async_background", ...]'
17
- BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
15
+ # Configure environment variables / settings (.env uses BS_ prefix)
16
+ BS_INSTALLED_APPS='["bazis.contrib.async_background", ...]'
17
+ BS_BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
18
18
 
19
19
  # Kafka settings
20
- KAFKA_BOOTSTRAP_SERVERS=localhost:9093
21
- KAFKA_TOPIC_ASYNC_REQUEST=my_app_background_tasks
22
- KAFKA_GROUP_ID=my_app_background
23
- KAFKA_TASKS='["my_app.background.tasks"]'
20
+ BS_KAFKA_BOOTSTRAP_SERVERS=localhost:9093
21
+ BS_KAFKA_TOPIC_ASYNC_BG=my_app_background_tasks
22
+ BS_KAFKA_GROUP_ID=my_app_background
23
+ BS_KAFKA_TASKS='["my_app.background.tasks"]'
24
24
 
25
25
  # Run consumer in Kubernetes
26
26
  python manage.py kafka_consumer_single
@@ -131,7 +131,7 @@ This waits for the pytest container to finish and streams logs only from the Pyt
131
131
 
132
132
  ### Environment Variables / Settings
133
133
 
134
- Add to your `.env` or `settings.py`:
134
+ Add to your `.env` (use `BS_` prefix for Bazis settings) or `settings.py`:
135
135
 
136
136
  ```bash
137
137
  # Required settings
@@ -141,7 +141,7 @@ KAFKA_TASKS='["my_app.background.tasks"]'
141
141
 
142
142
  # Kafka settings
143
143
  KAFKA_BOOTSTRAP_SERVERS=localhost:9093
144
- KAFKA_TOPIC_ASYNC_REQUEST=my_app_background_tasks
144
+ KAFKA_TOPIC_ASYNC_BG=my_app_background_tasks
145
145
  KAFKA_GROUP_ID=my_app_background
146
146
 
147
147
  # Optional settings
@@ -153,11 +153,19 @@ KAFKA_AUTO_COMMIT_INTERVAL_MS=5000
153
153
  KAFKA_LOG_LEVEL=INFO
154
154
  ```
155
155
 
156
+ When placing these in a `.env` file, prefix them with `BS_`, for example:
157
+
158
+ ```bash
159
+ BS_INSTALLED_APPS='["bazis.contrib.async_background", ...]'
160
+ BS_BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
161
+ BS_KAFKA_TASKS='["my_app.background.tasks"]'
162
+ ```
163
+
156
164
  **Parameters**:
157
165
 
158
166
  - `KAFKA_TASKS` — dotted module paths imported by the consumer to register tasks
159
167
  - `KAFKA_BOOTSTRAP_SERVERS` — Kafka broker address
160
- - `KAFKA_TOPIC_ASYNC_REQUEST` — topic for async tasks
168
+ - `KAFKA_TOPIC_ASYNC_BG` — topic for async tasks
161
169
  - `KAFKA_GROUP_ID` — consumer group
162
170
  - `KAFKA_CONSUMER_LIFETIME_SEC` — consumer working time before restart
163
171
  - `KAFKA_CONSUMER_LIFETIME_JITTER_SEC` — random deviation to avoid simultaneous restart
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '2.2.0'
32
- __version_tuple__ = version_tuple = (2, 2, 0)
31
+ __version__ = version = '2.2.2'
32
+ __version_tuple__ = version_tuple = (2, 2, 2)
33
33
 
34
- __commit_id__ = commit_id = 'g639234d6d'
34
+ __commit_id__ = commit_id = 'g4dc36df30'
@@ -43,7 +43,7 @@ class Settings(BazisSettings):
43
43
  default=None, description="List of Kafka brokers separated by commas (for example, 'kafka1:9092,kafka2:9092')."
44
44
  ) # List of brokers polled to obtain the topic owner
45
45
 
46
- KAFKA_TOPIC_ASYNC_REQUEST: str | None = Field(default=None, description="Kafka topic for async requests.")
46
+ KAFKA_TOPIC_ASYNC_BG: str | None = Field(default=None, description="Kafka topic for async requests.")
47
47
 
48
48
  KAFKA_GROUP_ID: str | None = Field(default=None, description="Kafka consumer group for this service.")
49
49
 
@@ -80,7 +80,7 @@ class Settings(BazisSettings):
80
80
  return all(
81
81
  [
82
82
  self.KAFKA_BOOTSTRAP_SERVERS,
83
- self.KAFKA_TOPIC_ASYNC_REQUEST,
83
+ self.KAFKA_TOPIC_ASYNC_BG,
84
84
  ]
85
85
  )
86
86
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bazis-async-background
3
- Version: 2.2.0
3
+ Version: 2.2.2
4
4
  Summary: Async Background core framework for Bazis.
5
5
  Author-email: Ilya Kharyn <ilya.tt07@gmail.com>
6
6
  Maintainer-email: Ilya Kharyn <ilya.tt07@gmail.com>
@@ -39,15 +39,15 @@ Core background task framework for Bazis. It provides Kafka broker helpers, task
39
39
  # Install the package
40
40
  uv add bazis-async-background
41
41
 
42
- # Configure environment variables / settings
43
- INSTALLED_APPS='["bazis.contrib.async_background", ...]'
44
- BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
42
+ # Configure environment variables / settings (.env uses BS_ prefix)
43
+ BS_INSTALLED_APPS='["bazis.contrib.async_background", ...]'
44
+ BS_BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
45
45
 
46
46
  # Kafka settings
47
- KAFKA_BOOTSTRAP_SERVERS=localhost:9093
48
- KAFKA_TOPIC_ASYNC_REQUEST=my_app_background_tasks
49
- KAFKA_GROUP_ID=my_app_background
50
- KAFKA_TASKS='["my_app.background.tasks"]'
47
+ BS_KAFKA_BOOTSTRAP_SERVERS=localhost:9093
48
+ BS_KAFKA_TOPIC_ASYNC_BG=my_app_background_tasks
49
+ BS_KAFKA_GROUP_ID=my_app_background
50
+ BS_KAFKA_TASKS='["my_app.background.tasks"]'
51
51
 
52
52
  # Run consumer in Kubernetes
53
53
  python manage.py kafka_consumer_single
@@ -158,7 +158,7 @@ This waits for the pytest container to finish and streams logs only from the Pyt
158
158
 
159
159
  ### Environment Variables / Settings
160
160
 
161
- Add to your `.env` or `settings.py`:
161
+ Add to your `.env` (use `BS_` prefix for Bazis settings) or `settings.py`:
162
162
 
163
163
  ```bash
164
164
  # Required settings
@@ -168,7 +168,7 @@ KAFKA_TASKS='["my_app.background.tasks"]'
168
168
 
169
169
  # Kafka settings
170
170
  KAFKA_BOOTSTRAP_SERVERS=localhost:9093
171
- KAFKA_TOPIC_ASYNC_REQUEST=my_app_background_tasks
171
+ KAFKA_TOPIC_ASYNC_BG=my_app_background_tasks
172
172
  KAFKA_GROUP_ID=my_app_background
173
173
 
174
174
  # Optional settings
@@ -180,11 +180,19 @@ KAFKA_AUTO_COMMIT_INTERVAL_MS=5000
180
180
  KAFKA_LOG_LEVEL=INFO
181
181
  ```
182
182
 
183
+ When placing these in a `.env` file, prefix them with `BS_`, for example:
184
+
185
+ ```bash
186
+ BS_INSTALLED_APPS='["bazis.contrib.async_background", ...]'
187
+ BS_BAZIS_CONFIG_APPS='["bazis.contrib.async_background", ...]'
188
+ BS_KAFKA_TASKS='["my_app.background.tasks"]'
189
+ ```
190
+
183
191
  **Parameters**:
184
192
 
185
193
  - `KAFKA_TASKS` — dotted module paths imported by the consumer to register tasks
186
194
  - `KAFKA_BOOTSTRAP_SERVERS` — Kafka broker address
187
- - `KAFKA_TOPIC_ASYNC_REQUEST` — topic for async tasks
195
+ - `KAFKA_TOPIC_ASYNC_BG` — topic for async tasks
188
196
  - `KAFKA_GROUP_ID` — consumer group
189
197
  - `KAFKA_CONSUMER_LIFETIME_SEC` — consumer working time before restart
190
198
  - `KAFKA_CONSUMER_LIFETIME_JITTER_SEC` — random deviation to avoid simultaneous restart
@@ -0,0 +1,45 @@
1
+ # 1. Base stage
2
+ FROM python:3.13-slim-bookworm AS base
3
+
4
+ ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BAZIS_ASYNC_BACKGROUND=0.0.0 \
5
+ UV_SYSTEM_PYTHON=1 \
6
+ PYTHONDONTWRITEBYTECODE=1 \
7
+ PYTHONUNBUFFERED=1 \
8
+ PYTHONIOENCODING=utf-8
9
+
10
+ RUN apt-get update \
11
+ && apt-get upgrade --yes \
12
+ && apt-get install -y --no-install-recommends \
13
+ binutils \
14
+ build-essential \
15
+ gdal-bin \
16
+ git \
17
+ libgdal-dev \
18
+ python3-dev \
19
+ && apt-get autoremove -yqq --purge \
20
+ && apt-get clean \
21
+ && rm -rf \
22
+ /var/lib/apt/lists/* \
23
+ /usr/share/man \
24
+ /usr/share/doc \
25
+ /usr/share/doc-base
26
+
27
+ RUN pip install --upgrade pip uv --no-cache-dir
28
+
29
+ ENV WORKDIR=/app
30
+ WORKDIR $WORKDIR
31
+
32
+ # 2. Runtime stage
33
+ FROM base AS runtime
34
+
35
+ WORKDIR ${WORKDIR}/sample
36
+ COPY pyproject.toml ${WORKDIR}/
37
+ COPY bazis/ ${WORKDIR}/bazis/
38
+ COPY sample/pyproject.toml ${WORKDIR}/sample/
39
+ RUN uv sync
40
+
41
+ WORKDIR ${WORKDIR}
42
+ COPY ./ ${WORKDIR}
43
+
44
+ # 3. Test stage
45
+ FROM runtime AS test
@@ -35,7 +35,7 @@ async def enqueue_demo(request: Request, payload: DemoPayload) -> dict:
35
35
  raise JsonApi401Exception from err
36
36
 
37
37
  message = await enqueue_task_async(
38
- topic_name=settings.KAFKA_TOPIC_ASYNC_REQUEST,
38
+ topic_name=settings.KAFKA_TOPIC_ASYNC_BG,
39
39
  channel_name=channel_name,
40
40
  payload=payload,
41
41
  partition_marker=channel_name,
@@ -35,7 +35,7 @@ if settings.KAFKA_GROUP_ID:
35
35
  _subscriber_kwargs["group_id"] = settings.KAFKA_GROUP_ID
36
36
 
37
37
 
38
- @get_broker_for_consumer().subscriber(settings.KAFKA_TOPIC_ASYNC_REQUEST, **_subscriber_kwargs)
38
+ @get_broker_for_consumer().subscriber(settings.KAFKA_TOPIC_ASYNC_BG, **_subscriber_kwargs)
39
39
  async def consumer_demo_tasks(task: KafkaTask[DemoPayload]):
40
40
  await set_and_publish_status_async(
41
41
  task_id=task.task_id,
@@ -1,21 +1,19 @@
1
1
  services:
2
2
  postgresql-test:
3
3
  image: postgis/postgis:15-3.3
4
- container_name: postgresql-test
5
4
  restart: always
6
5
  environment:
7
6
  POSTGRES_USER: test_user
8
7
  POSTGRES_PASSWORD: test_password
9
- POSTGRES_DB: test_db
8
+ POSTGRES_DB: test_db_async_background
10
9
  healthcheck:
11
- test: ["CMD-SHELL", "pg_isready -U test_user -d test_db"]
10
+ test: ["CMD-SHELL", "pg_isready -U test_user -d test_db_async_background"]
12
11
  interval: 5s
13
12
  timeout: 3s
14
13
  retries: 20
15
14
 
16
15
  redis-test:
17
16
  image: redis:7-alpine
18
- container_name: redis-test
19
17
  restart: always
20
18
  command: redis-server --save 60 1 --loglevel warning --maxmemory 256mb --maxmemory-policy allkeys-lru
21
19
  environment:
@@ -27,10 +25,7 @@ services:
27
25
  retries: 20
28
26
 
29
27
  zookeeper-test:
30
- container_name: zookeeper-test
31
28
  image: confluentinc/cp-zookeeper:7.0.0
32
- ports:
33
- - 2181:2181
34
29
  environment:
35
30
  - ZOOKEEPER_CLIENT_PORT=2181
36
31
  restart: always
@@ -38,7 +33,6 @@ services:
38
33
  disable: true
39
34
 
40
35
  kafka-test:
41
- container_name: kafka-test
42
36
  image: confluentinc/cp-kafka:7.0.0
43
37
  environment:
44
38
  KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
@@ -66,7 +60,6 @@ services:
66
60
  retries: 20
67
61
 
68
62
  bazis-async-background-consumer-test:
69
- container_name: bazis-async-background-consumer-test
70
63
  working_dir: /app/sample
71
64
  depends_on:
72
65
  postgresql-test:
@@ -93,7 +86,6 @@ services:
93
86
  "
94
87
 
95
88
  bazis-async-background-migrate:
96
- container_name: bazis-async-background-migrate
97
89
  working_dir: /app/sample
98
90
  depends_on:
99
91
  postgresql-test:
@@ -118,7 +110,6 @@ services:
118
110
  "
119
111
 
120
112
  bazis-async-background-pytest:
121
- container_name: bazis-async-background-pytest
122
113
  working_dir: /app/sample
123
114
  depends_on:
124
115
  postgresql-test:
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "sample"
3
3
  version = "0.1.0"
4
- requires-python = ">=3.14"
4
+ requires-python = ">=3.13"
5
5
  dependencies = [
6
6
  "bazis-async-background",
7
7
  "bazis-test-utils",
@@ -1,13 +1,13 @@
1
1
  BS_DATABASES__DEFAULT__HOST=postgresql-test
2
2
  BS_DATABASES__DEFAULT__PORT=5432
3
- BS_DATABASES__DEFAULT__NAME=test_db
3
+ BS_DATABASES__DEFAULT__NAME=test_db_async_background
4
4
  BS_DATABASES__DEFAULT__USER=test_user
5
5
  BS_DATABASES__DEFAULT__PASSWORD=test_password
6
6
 
7
7
  BS_CACHES__DEFAULT__LOCATION=redis://redis-test:6379/0
8
8
 
9
9
  BS_KAFKA_BOOTSTRAP_SERVERS='kafka-test:9092'
10
- BS_KAFKA_TOPIC_ASYNC_REQUEST=sample_local_async_background
10
+ BS_KAFKA_TOPIC_ASYNC_BG=sample_local_async_background
11
11
  BS_KAFKA_GROUP_ID=sample_local
12
12
  BS_KAFKA_CONSUMER_LIFETIME_SEC=3600
13
13
  BS_KAFKA_CONSUMER_LIFETIME_JITTER_SEC=300
@@ -1,26 +0,0 @@
1
- # 1. Base stage
2
- FROM python:3.14-slim-bookworm AS base
3
-
4
- ENV SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BAZIS_ASYNC_BACKGROUND=0.0.0 UV_SYSTEM_PYTHON=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONIOENCODING=utf-8
5
-
6
- RUN apt-get update && apt-get upgrade --yes && apt-get install -y --no-install-recommends binutils build-essential gdal-bin git libgdal-dev python3-dev && apt-get autoremove -yqq --purge && apt-get clean && rm -rf /var/lib/apt/lists/* /usr/share/man /usr/share/doc /usr/share/doc-base
7
-
8
- RUN pip install --upgrade pip uv --no-cache-dir
9
-
10
- ENV WORKDIR=/app
11
- WORKDIR $WORKDIR
12
-
13
- # 2. Runtime stage
14
- FROM base AS runtime
15
-
16
- WORKDIR ${WORKDIR}/sample
17
- COPY pyproject.toml ${WORKDIR}/
18
- COPY bazis/ ${WORKDIR}/bazis/
19
- COPY sample/pyproject.toml ${WORKDIR}/sample/
20
- RUN uv sync
21
-
22
- WORKDIR ${WORKDIR}
23
- COPY ./ ${WORKDIR}
24
-
25
- # 3. Test stage
26
- FROM runtime AS test