dbos 1.13.0a7__py3-none-any.whl → 1.14.0a2__py3-none-any.whl
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/_client.py +1 -1
- dbos/_templates/dbos-db-starter/start_postgres_docker.py +67 -0
- {dbos-1.13.0a7.dist-info → dbos-1.14.0a2.dist-info}/METADATA +1 -1
- {dbos-1.13.0a7.dist-info → dbos-1.14.0a2.dist-info}/RECORD +7 -6
- {dbos-1.13.0a7.dist-info → dbos-1.14.0a2.dist-info}/WHEEL +0 -0
- {dbos-1.13.0a7.dist-info → dbos-1.14.0a2.dist-info}/entry_points.txt +0 -0
- {dbos-1.13.0a7.dist-info → dbos-1.14.0a2.dist-info}/licenses/LICENSE +0 -0
dbos/_client.py
CHANGED
|
@@ -241,7 +241,7 @@ class DBOSClient:
|
|
|
241
241
|
return WorkflowHandleClientPolling[R](workflow_id, self._sys_db)
|
|
242
242
|
|
|
243
243
|
async def retrieve_workflow_async(self, workflow_id: str) -> WorkflowHandleAsync[R]:
|
|
244
|
-
status = asyncio.to_thread(get_workflow, self._sys_db, workflow_id)
|
|
244
|
+
status = await asyncio.to_thread(get_workflow, self._sys_db, workflow_id)
|
|
245
245
|
if status is None:
|
|
246
246
|
raise DBOSNonExistentWorkflowError(workflow_id)
|
|
247
247
|
return WorkflowHandleClientAsyncPolling[R](workflow_id, self._sys_db)
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import subprocess
|
|
3
|
+
import sys
|
|
4
|
+
import time
|
|
5
|
+
|
|
6
|
+
# Default PostgreSQL port
|
|
7
|
+
port = "5432"
|
|
8
|
+
|
|
9
|
+
# Set the host PostgreSQL port with the -p/--port flag
|
|
10
|
+
for i, arg in enumerate(sys.argv):
|
|
11
|
+
if arg in ["-p", "--port"]:
|
|
12
|
+
if i + 1 < len(sys.argv):
|
|
13
|
+
port = sys.argv[i + 1]
|
|
14
|
+
|
|
15
|
+
if "PGPASSWORD" not in os.environ:
|
|
16
|
+
print("Error: PGPASSWORD is not set.")
|
|
17
|
+
sys.exit(1)
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
subprocess.run(
|
|
21
|
+
[
|
|
22
|
+
"docker",
|
|
23
|
+
"run",
|
|
24
|
+
"--rm",
|
|
25
|
+
"--name=dbos-db",
|
|
26
|
+
f'--env=POSTGRES_PASSWORD={os.environ["PGPASSWORD"]}',
|
|
27
|
+
"--env=PGDATA=/var/lib/postgresql/data",
|
|
28
|
+
"--volume=/var/lib/postgresql/data",
|
|
29
|
+
"-p",
|
|
30
|
+
f"{port}:5432",
|
|
31
|
+
"-d",
|
|
32
|
+
"pgvector/pgvector:pg16",
|
|
33
|
+
],
|
|
34
|
+
check=True,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
print("Waiting for PostgreSQL to start...")
|
|
38
|
+
attempts = 30
|
|
39
|
+
|
|
40
|
+
while attempts > 0:
|
|
41
|
+
try:
|
|
42
|
+
subprocess.run(
|
|
43
|
+
[
|
|
44
|
+
"docker",
|
|
45
|
+
"exec",
|
|
46
|
+
"dbos-db",
|
|
47
|
+
"psql",
|
|
48
|
+
"-U",
|
|
49
|
+
"postgres",
|
|
50
|
+
"-c",
|
|
51
|
+
"SELECT 1;",
|
|
52
|
+
],
|
|
53
|
+
check=True,
|
|
54
|
+
capture_output=True,
|
|
55
|
+
)
|
|
56
|
+
print("PostgreSQL started!")
|
|
57
|
+
print("Database started successfully!")
|
|
58
|
+
break
|
|
59
|
+
except subprocess.CalledProcessError:
|
|
60
|
+
attempts -= 1
|
|
61
|
+
time.sleep(1)
|
|
62
|
+
|
|
63
|
+
if attempts == 0:
|
|
64
|
+
print("Failed to start PostgreSQL.")
|
|
65
|
+
|
|
66
|
+
except subprocess.CalledProcessError as error:
|
|
67
|
+
print(f"Error starting PostgreSQL in Docker: {error}")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-1.
|
|
2
|
-
dbos-1.
|
|
3
|
-
dbos-1.
|
|
4
|
-
dbos-1.
|
|
1
|
+
dbos-1.14.0a2.dist-info/METADATA,sha256=M-n1JYmRzTvUmZwfVucY6GJV31TP5HkArDEe0MlTDSE,13268
|
|
2
|
+
dbos-1.14.0a2.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
dbos-1.14.0a2.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
|
|
4
|
+
dbos-1.14.0a2.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=NssPCubaBxdiKarOWa-wViz1hdJSkmBGcpLX_gQ4NeA,891
|
|
6
6
|
dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
|
|
7
7
|
dbos/_admin_server.py,sha256=e8ELhcDWqR3_PNobnNgUvLGh5lzZq0yFSF6dvtzoQRI,16267
|
|
@@ -24,7 +24,7 @@ dbos/_alembic_migrations/versions/eab0cc1d9a14_job_queue.py,sha256=uvhFOtqbBreCe
|
|
|
24
24
|
dbos/_alembic_migrations/versions/f4b9b32ba814_functionname_childid_op_outputs.py,sha256=m90Lc5YH0ZISSq1MyxND6oq3RZrZKrIqEsZtwJ1jWxA,1049
|
|
25
25
|
dbos/_app_db.py,sha256=GsV-uYU0QsChWwQDxnrh8_iiZ_zMQB-bsP2jPGIe2aM,16094
|
|
26
26
|
dbos/_classproperty.py,sha256=f0X-_BySzn3yFDRKB2JpCbLYQ9tLwt1XftfshvY7CBs,626
|
|
27
|
-
dbos/_client.py,sha256=
|
|
27
|
+
dbos/_client.py,sha256=_3Wc2QQc5VDcBuJ3cNb-lWg439OuITo2ex4Y7qb9l44,18800
|
|
28
28
|
dbos/_conductor/conductor.py,sha256=3E_hL3c9g9yWqKZkvI6KA0-ZzPMPRo06TOzT1esMiek,24114
|
|
29
29
|
dbos/_conductor/protocol.py,sha256=q3rgLxINFtWFigdOONc-4gX4vn66UmMlJQD6Kj8LnL4,7420
|
|
30
30
|
dbos/_context.py,sha256=IMboNgbCqTxfIORqeifE3da-Ce5siMz7MYMLPk5M-AQ,26851
|
|
@@ -64,6 +64,7 @@ dbos/_templates/dbos-db-starter/dbos-config.yaml.dbos,sha256=0wPktElM7kMB3OPHTXw
|
|
|
64
64
|
dbos/_templates/dbos-db-starter/migrations/env.py.dbos,sha256=IBB_gz9RjC20HPfOTGZzS6kTbv3jXhiOrnWpbJNk1Gk,2509
|
|
65
65
|
dbos/_templates/dbos-db-starter/migrations/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
|
66
66
|
dbos/_templates/dbos-db-starter/migrations/versions/2024_07_31_180642_init.py,sha256=MpS7LGaJS0CpvsjhfDkp9EJqvMvVCjRPfUp4c0aE2ys,941
|
|
67
|
+
dbos/_templates/dbos-db-starter/start_postgres_docker.py,sha256=lQVLlYO5YkhGPEgPqwGc7Y8uDKse9HsWv5fynJEFJHM,1681
|
|
67
68
|
dbos/_tracer.py,sha256=8aOAVTBnj2q9DcOb5KJCfo56CVZ1ZvsWBscaNlIX-7k,3150
|
|
68
69
|
dbos/_utils.py,sha256=ZdoM1MDbHnlJrh31zfhp3iX62bAxK1kyvMwXnltC_84,1779
|
|
69
70
|
dbos/_workflow_commands.py,sha256=EmmAaQfRWeOZm_WPTznuU-O3he3jiSzzT9VpYrhxugE,4835
|
|
@@ -74,4 +75,4 @@ dbos/cli/migration.py,sha256=5GiyagLZkyVvDz3StYxtFdkFoKFCmh6eSXjzsIGhZ_A,3330
|
|
|
74
75
|
dbos/dbos-config.schema.json,sha256=LyUT1DOTaAwOP6suxQGS5KemVIqXGPyu_q7Hbo0neA8,6192
|
|
75
76
|
dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
|
|
76
77
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
77
|
-
dbos-1.
|
|
78
|
+
dbos-1.14.0a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|