dbos 0.7.0a8__py3-none-any.whl → 0.7.0a9__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/error.py +0 -11
- dbos/system_database.py +12 -17
- {dbos-0.7.0a8.dist-info → dbos-0.7.0a9.dist-info}/METADATA +1 -1
- {dbos-0.7.0a8.dist-info → dbos-0.7.0a9.dist-info}/RECORD +7 -7
- {dbos-0.7.0a8.dist-info → dbos-0.7.0a9.dist-info}/WHEEL +0 -0
- {dbos-0.7.0a8.dist-info → dbos-0.7.0a9.dist-info}/entry_points.txt +0 -0
- {dbos-0.7.0a8.dist-info → dbos-0.7.0a9.dist-info}/licenses/LICENSE +0 -0
dbos/error.py
CHANGED
|
@@ -32,7 +32,6 @@ class DBOSErrorCode(Enum):
|
|
|
32
32
|
InitializationError = 3
|
|
33
33
|
WorkflowFunctionNotFound = 4
|
|
34
34
|
NonExistentWorkflowError = 5
|
|
35
|
-
DuplicateWorkflowEventError = 6
|
|
36
35
|
MaxStepRetriesExceeded = 7
|
|
37
36
|
NotAuthorized = 8
|
|
38
37
|
|
|
@@ -87,16 +86,6 @@ class DBOSNonExistentWorkflowError(DBOSException):
|
|
|
87
86
|
)
|
|
88
87
|
|
|
89
88
|
|
|
90
|
-
class DBOSDuplicateWorkflowEventError(DBOSException):
|
|
91
|
-
"""Exception raised when a workflow attempts to set an event value more than once per key."""
|
|
92
|
-
|
|
93
|
-
def __init__(self, workflow_id: str, key: str):
|
|
94
|
-
super().__init__(
|
|
95
|
-
f"Workflow {workflow_id} has already emitted an event with key {key}",
|
|
96
|
-
dbos_error_code=DBOSErrorCode.DuplicateWorkflowEventError.value,
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
|
|
100
89
|
class DBOSNotAuthorizedError(DBOSException):
|
|
101
90
|
"""Exception raised by DBOS role-based security when the user is not authorized to access a function."""
|
|
102
91
|
|
dbos/system_database.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import os
|
|
3
|
-
import select
|
|
4
3
|
import threading
|
|
5
4
|
import time
|
|
6
5
|
from enum import Enum
|
|
@@ -14,11 +13,7 @@ from alembic.config import Config
|
|
|
14
13
|
from sqlalchemy.exc import DBAPIError
|
|
15
14
|
|
|
16
15
|
import dbos.utils as utils
|
|
17
|
-
from dbos.error import
|
|
18
|
-
DBOSDuplicateWorkflowEventError,
|
|
19
|
-
DBOSNonExistentWorkflowError,
|
|
20
|
-
DBOSWorkflowConflictIDError,
|
|
21
|
-
)
|
|
16
|
+
from dbos.error import DBOSNonExistentWorkflowError, DBOSWorkflowConflictIDError
|
|
22
17
|
|
|
23
18
|
from .dbos_config import ConfigFile
|
|
24
19
|
from .logger import dbos_logger
|
|
@@ -832,18 +827,18 @@ class SystemDatabase:
|
|
|
832
827
|
if recorded_output is not None:
|
|
833
828
|
return # Already sent before
|
|
834
829
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
)
|
|
830
|
+
c.execute(
|
|
831
|
+
pg.insert(SystemSchema.workflow_events)
|
|
832
|
+
.values(
|
|
833
|
+
workflow_uuid=workflow_uuid,
|
|
834
|
+
key=key,
|
|
835
|
+
value=utils.serialize(message),
|
|
842
836
|
)
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
837
|
+
.on_conflict_do_update(
|
|
838
|
+
index_elements=["workflow_uuid", "key"],
|
|
839
|
+
set_={"value": utils.serialize(message)},
|
|
840
|
+
)
|
|
841
|
+
)
|
|
847
842
|
output: OperationResultInternal = {
|
|
848
843
|
"workflow_uuid": workflow_uuid,
|
|
849
844
|
"function_id": function_id,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-0.7.
|
|
2
|
-
dbos-0.7.
|
|
3
|
-
dbos-0.7.
|
|
4
|
-
dbos-0.7.
|
|
1
|
+
dbos-0.7.0a9.dist-info/METADATA,sha256=-j59txtUuEZaesLoUp2rVA_29aKu8w-lkWcbM4KI1oY,5010
|
|
2
|
+
dbos-0.7.0a9.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
|
3
|
+
dbos-0.7.0a9.dist-info/entry_points.txt,sha256=3PmOPbM4FYxEmggRRdJw0oAsiBzKR8U0yx7bmwUmMOM,39
|
|
4
|
+
dbos-0.7.0a9.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=jjlBFzSAzO2e-LD5IKJw7bRqZjrxpF5Sn-_JUJJptHU,680
|
|
6
6
|
dbos/admin_sever.py,sha256=Qg5T3YRrbPW05PR_99yAaxgo1ugQrAp_uTeTqSfjm_k,3397
|
|
7
7
|
dbos/application_database.py,sha256=knFK8We8y6WrIpnFCKvFq5hvSuFQqUuJqOqDpSVMCPI,5521
|
|
@@ -12,7 +12,7 @@ dbos/dbos-config.schema.json,sha256=azpfmoDZg7WfSy3kvIsk9iEiKB_-VZt03VEOoXJAkqE,
|
|
|
12
12
|
dbos/dbos.py,sha256=RtDcvKe4sm1TlnCGU4cyex-UI7hMMlhgzmOl1NuRLo4,29294
|
|
13
13
|
dbos/dbos_config.py,sha256=NJVze2GkKgYUmcPP31Unb-QpsA0TzImEeQGJgVq6W6k,5352
|
|
14
14
|
dbos/decorators.py,sha256=lbPefsLK6Cya4cb7TrOcLglOpGT3pc6qjZdsQKlfZLg,629
|
|
15
|
-
dbos/error.py,sha256=
|
|
15
|
+
dbos/error.py,sha256=c2y7d3Cbb-ZOO-M9txcCxuyPE1bdnwKrJnXgJXYb-pQ,3437
|
|
16
16
|
dbos/fastapi.py,sha256=gx9hlpxYOiwbuhSlbY9bn5C-F_FsCbrJvkX9ZAvDG6U,3418
|
|
17
17
|
dbos/flask.py,sha256=azr4geMEGuuTBCyxIZmgDmmP-6s_pTIF-lGyp9Q4IB8,2430
|
|
18
18
|
dbos/kafka.py,sha256=LH3hbNapnkjLcuXNUtdGU0398JafWb-t0GwUl3LOzkc,3645
|
|
@@ -34,7 +34,7 @@ dbos/scheduler/scheduler.py,sha256=Sz4EIpAtur7so2YajTic64GrTpa4qPw8QxXn0M34v80,1
|
|
|
34
34
|
dbos/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
35
|
dbos/schemas/application_database.py,sha256=q_Wr2XbiZNBYFkOtu7uKavo1T_cSOBblxKGHThYGGsY,962
|
|
36
36
|
dbos/schemas/system_database.py,sha256=ed4c1UntsD-cqXD0ekM4jvcYYEViavDh_G6c0pVDe7k,4938
|
|
37
|
-
dbos/system_database.py,sha256=
|
|
37
|
+
dbos/system_database.py,sha256=VSGFSPubbMokGYsZfRb6cQPltLfjoWM-Re_2Gj9qkRc,41844
|
|
38
38
|
dbos/templates/hello/README.md,sha256=GhxhBj42wjTt1fWEtwNriHbJuKb66Vzu89G4pxNHw2g,930
|
|
39
39
|
dbos/templates/hello/__package/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
dbos/templates/hello/__package/main.py,sha256=eI0SS9Nwj-fldtiuSzIlIG6dC91GXXwdRsoHxv6S_WI,2719
|
|
@@ -48,4 +48,4 @@ dbos/templates/hello/start_postgres_docker.py,sha256=lQVLlYO5YkhGPEgPqwGc7Y8uDKs
|
|
|
48
48
|
dbos/tracer.py,sha256=GaXDhdKKF_IQp5SAMipGXiDVwteRKjNbrXyYCH1mor0,2520
|
|
49
49
|
dbos/utils.py,sha256=hWj9iWDrby2cVEhb0pG-IdnrxLqP64NhkaWUXiLc8bA,402
|
|
50
50
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
51
|
-
dbos-0.7.
|
|
51
|
+
dbos-0.7.0a9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|