dbos 0.9.0a1__tar.gz → 0.10.0a0__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.
- {dbos-0.9.0a1 → dbos-0.10.0a0}/PKG-INFO +1 -1
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/dbos-config.schema.json +4 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/dbos.py +4 -1
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/dbos_config.py +1 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/pyproject.toml +1 -1
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_admin_server.py +36 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_config.py +1 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/LICENSE +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/README.md +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/__init__.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/admin_sever.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/application_database.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/cli.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/context.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/core.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/decorators.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/error.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/fastapi.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/flask.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/kafka.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/kafka_message.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/logger.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/env.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/script.py.mako +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/versions/50f3227f0b4b_fix_job_queue.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/versions/5c361fc04708_added_system_tables.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/versions/d76646551a6b_job_queue_limiter.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/versions/d76646551a6c_workflow_queue.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/migrations/versions/eab0cc1d9a14_job_queue.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/py.typed +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/queue.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/recovery.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/registrations.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/request.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/roles.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/scheduler/croniter.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/scheduler/scheduler.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/schemas/__init__.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/schemas/application_database.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/schemas/system_database.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/system_database.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/README.md +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/__package/__init__.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/__package/main.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/__package/schema.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/alembic.ini +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/dbos-config.yaml.dbos +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/migrations/env.py.dbos +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/migrations/script.py.mako +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/migrations/versions/2024_07_31_180642_init.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/start_postgres_docker.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/tracer.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/utils.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/__init__.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/atexit_no_ctor.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/atexit_no_launch.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/classdefs.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/conftest.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/more_classdefs.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/scheduler/test_croniter.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/scheduler/test_scheduler.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_classdecorators.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_concurrency.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_dbos.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_failures.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_fastapi.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_fastapi_roles.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_flask.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_kafka.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_package.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_queue.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_schema_migration.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/tests/test_singleton.py +0 -0
- {dbos-0.9.0a1 → dbos-0.10.0a0}/version/__init__.py +0 -0
|
@@ -140,6 +140,10 @@
|
|
|
140
140
|
"start": {
|
|
141
141
|
"type": "array",
|
|
142
142
|
"description": "Specify commands to run to start your application (Python only)"
|
|
143
|
+
},
|
|
144
|
+
"admin_port": {
|
|
145
|
+
"type": "number",
|
|
146
|
+
"description": "The port number of the admin server (Default: 3001)"
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
},
|
|
@@ -348,7 +348,10 @@ class DBOS:
|
|
|
348
348
|
self._executor_field = ThreadPoolExecutor(max_workers=64)
|
|
349
349
|
self._sys_db_field = SystemDatabase(self.config)
|
|
350
350
|
self._app_db_field = ApplicationDatabase(self.config)
|
|
351
|
-
|
|
351
|
+
admin_port = self.config["runtimeConfig"].get("admin_port")
|
|
352
|
+
if admin_port is None:
|
|
353
|
+
admin_port = 3001
|
|
354
|
+
self._admin_server_field = AdminServer(dbos=self, port=admin_port)
|
|
352
355
|
|
|
353
356
|
if not os.environ.get("DBOS__VMID"):
|
|
354
357
|
workflow_ids = self._sys_db.get_pending_workflows("local")
|
|
@@ -123,3 +123,39 @@ def test_admin_recovery(dbos: DBOS) -> None:
|
|
|
123
123
|
time.sleep(1)
|
|
124
124
|
print(f"Attempt {attempt + 1} failed. Retrying in 1 second...")
|
|
125
125
|
assert succeeded, "Workflow did not recover"
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def test_admin_diff_port(cleanup_test_databases: None) -> None:
|
|
129
|
+
# Initialize singleton
|
|
130
|
+
DBOS.destroy() # In case of other tests leaving it
|
|
131
|
+
|
|
132
|
+
config_string = """name: test-app
|
|
133
|
+
language: python
|
|
134
|
+
database:
|
|
135
|
+
hostname: localhost
|
|
136
|
+
port: 5432
|
|
137
|
+
username: postgres
|
|
138
|
+
password: ${PGPASSWORD}
|
|
139
|
+
app_db_name: dbostestpy
|
|
140
|
+
runtimeConfig:
|
|
141
|
+
start:
|
|
142
|
+
- python3 main.py
|
|
143
|
+
admin_port: 8001
|
|
144
|
+
"""
|
|
145
|
+
# Write the config to a text file for the moment
|
|
146
|
+
with open("dbos-config.yaml", "w") as file:
|
|
147
|
+
file.write(config_string)
|
|
148
|
+
|
|
149
|
+
try:
|
|
150
|
+
# Initialize DBOS
|
|
151
|
+
DBOS()
|
|
152
|
+
DBOS.launch()
|
|
153
|
+
|
|
154
|
+
# Test GET /dbos-healthz
|
|
155
|
+
response = requests.get("http://localhost:8001/dbos-healthz", timeout=5)
|
|
156
|
+
assert response.status_code == 200
|
|
157
|
+
assert response.text == "healthy"
|
|
158
|
+
finally:
|
|
159
|
+
# Clean up after the test
|
|
160
|
+
DBOS.destroy()
|
|
161
|
+
os.remove("dbos-config.yaml")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbos-0.9.0a1 → dbos-0.10.0a0}/dbos/templates/hello/migrations/versions/2024_07_31_180642_init.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|