dbos 1.13.0a6__py3-none-any.whl → 1.13.0a8__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.
Potentially problematic release.
This version of dbos might be problematic. Click here for more details.
- dbos/_templates/dbos-db-starter/start_postgres_docker.py +67 -0
- dbos/cli/cli.py +2 -2
- {dbos-1.13.0a6.dist-info → dbos-1.13.0a8.dist-info}/METADATA +1 -1
- {dbos-1.13.0a6.dist-info → dbos-1.13.0a8.dist-info}/RECORD +7 -6
- {dbos-1.13.0a6.dist-info → dbos-1.13.0a8.dist-info}/WHEEL +0 -0
- {dbos-1.13.0a6.dist-info → dbos-1.13.0a8.dist-info}/entry_points.txt +0 -0
- {dbos-1.13.0a6.dist-info → dbos-1.13.0a8.dist-info}/licenses/LICENSE +0 -0
|
@@ -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}")
|
dbos/cli/cli.py
CHANGED
|
@@ -427,7 +427,7 @@ def list(
|
|
|
427
427
|
typing.Optional[str],
|
|
428
428
|
typer.Option(
|
|
429
429
|
"--start-time",
|
|
430
|
-
"-
|
|
430
|
+
"-t",
|
|
431
431
|
help="Retrieve workflows starting after this timestamp (ISO 8601 format)",
|
|
432
432
|
),
|
|
433
433
|
] = None,
|
|
@@ -765,7 +765,7 @@ def list_queue(
|
|
|
765
765
|
typing.Optional[str],
|
|
766
766
|
typer.Option(
|
|
767
767
|
"--start-time",
|
|
768
|
-
"-
|
|
768
|
+
"-t",
|
|
769
769
|
help="Retrieve functions starting after this timestamp (ISO 8601 format)",
|
|
770
770
|
),
|
|
771
771
|
] = None,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-1.13.
|
|
2
|
-
dbos-1.13.
|
|
3
|
-
dbos-1.13.
|
|
4
|
-
dbos-1.13.
|
|
1
|
+
dbos-1.13.0a8.dist-info/METADATA,sha256=xHerLqbu56YFzOpgA2dPx8h2eDosOUDXhRkNTd7z56U,13268
|
|
2
|
+
dbos-1.13.0a8.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
dbos-1.13.0a8.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
|
|
4
|
+
dbos-1.13.0a8.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
|
|
@@ -64,14 +64,15 @@ 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
|
|
70
71
|
dbos/cli/_github_init.py,sha256=Y_bDF9gfO2jB1id4FV5h1oIxEJRWyqVjhb7bNEa5nQ0,3224
|
|
71
72
|
dbos/cli/_template_init.py,sha256=7JBcpMqP1r2mfCnvWatu33z8ctEGHJarlZYKgB83cXE,2972
|
|
72
|
-
dbos/cli/cli.py,sha256=
|
|
73
|
+
dbos/cli/cli.py,sha256=ypaDSJq8HMDDiTsXqoxKw7B5n2wBT2ujjHjzkuh1AsY,26879
|
|
73
74
|
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.13.
|
|
78
|
+
dbos-1.13.0a8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|