dbos 0.24.0a5__py3-none-any.whl → 0.24.0a6__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/_core.py CHANGED
@@ -824,7 +824,9 @@ def decorate_step(
824
824
  stepOutcome = Outcome[R].make(functools.partial(func, *args, **kwargs))
825
825
  if retries_allowed:
826
826
  stepOutcome = stepOutcome.retry(
827
- max_attempts, on_exception, lambda i: DBOSMaxStepRetriesExceeded()
827
+ max_attempts,
828
+ on_exception,
829
+ lambda i: DBOSMaxStepRetriesExceeded(func.__name__, i),
828
830
  )
829
831
 
830
832
  outcome = (
dbos/_error.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """Errors thrown by DBOS."""
2
2
 
3
3
  from enum import Enum
4
- from typing import Optional
4
+ from typing import Any, Optional
5
5
 
6
6
 
7
7
  class DBOSException(Exception):
@@ -124,12 +124,18 @@ class DBOSNotAuthorizedError(DBOSException):
124
124
  class DBOSMaxStepRetriesExceeded(DBOSException):
125
125
  """Exception raised when a step was retried the maximimum number of times without success."""
126
126
 
127
- def __init__(self) -> None:
127
+ def __init__(self, step_name: str, max_retries: int) -> None:
128
+ self.step_name = step_name
129
+ self.max_retries = max_retries
128
130
  super().__init__(
129
- "Step reached maximum retries.",
131
+ f"Step {step_name} has exceeded its maximum of {max_retries} retries",
130
132
  dbos_error_code=DBOSErrorCode.MaxStepRetriesExceeded.value,
131
133
  )
132
134
 
135
+ def __reduce__(self) -> Any:
136
+ # Tell jsonpickle how to reconstruct this object
137
+ return (self.__class__, (self.step_name, self.max_retries))
138
+
133
139
 
134
140
  class DBOSWorkflowCancelledError(DBOSException):
135
141
  """Exception raised when the workflow has already been cancelled."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.24.0a5
3
+ Version: 0.24.0a6
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
- dbos-0.24.0a5.dist-info/METADATA,sha256=Dg70KhSEysG1pJLOV16tY2B_631JRLjMg5LbkF78HeM,5555
2
- dbos-0.24.0a5.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- dbos-0.24.0a5.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-0.24.0a5.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-0.24.0a6.dist-info/METADATA,sha256=Aby88_NlOl0iBzLWuRrzQwOGOxAXypxoDLMyD4cCLnI,5555
2
+ dbos-0.24.0a6.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ dbos-0.24.0a6.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-0.24.0a6.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=uq9LP5uY96kIS9N0yKqlvDwADmtg_Hl30uSUhyuUr-4,754
6
6
  dbos/__main__.py,sha256=P7jAr-7L9XE5mrsQ7i4b-bLr2ap1tCQfhMByLCRWDj0,568
7
7
  dbos/_admin_server.py,sha256=YiVn5lywz2Vg8_juyNHOYl0HVEy48--7b4phwK7r92o,5732
@@ -13,13 +13,13 @@ dbos/_cloudutils/databases.py,sha256=_shqaqSvhY4n2ScgQ8IP5PDZvzvcx3YBKV8fj-cxhSY
13
13
  dbos/_conductor/conductor.py,sha256=tvB1k8V3ZsI3MBEcG9sIkfbsHHx_Cvh0FZAi9vSPrXU,12698
14
14
  dbos/_conductor/protocol.py,sha256=Lo-DjvKevTS2uKyITLjjVp56rBRzaQfKkKpieZz3VAs,5088
15
15
  dbos/_context.py,sha256=Ue5qu3rzLfRmPkz-UUZi9ZS8iXpapRN0NTM4mbA2QmQ,17738
16
- dbos/_core.py,sha256=UQb068FT59Op-F5RmtxreSeSQ1_wljOso0dQCUOPrC4,37528
16
+ dbos/_core.py,sha256=8TTIj5shcm5hpKjouMA4VzMWl7R7MJlU-mAHB6xQBxE,37585
17
17
  dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
18
18
  dbos/_db_wizard.py,sha256=YEW2qoy6hfHQv2fZ_4nHiPUeHMFofPpNTolJ1Kvw7AQ,8394
19
19
  dbos/_dbos.py,sha256=2A1_5Fjv54G_bNKpSsYOFwEXDWJcaM-x1i2sY_h581w,42523
20
20
  dbos/_dbos_config.py,sha256=MJOJu0dCzdcxJi2gUMkTcJaxm_XVr2a2Dfq7vL_nEL0,17844
21
21
  dbos/_debug.py,sha256=mmgvLkqlrljMBBow9wk01PPur9kUf2rI_11dTJXY4gw,1822
22
- dbos/_error.py,sha256=xqB7b7g5AF_OwOvqLKLXL1xldn2gAtORix2ZC2B8zK0,5089
22
+ dbos/_error.py,sha256=B6Y9XLS1f6yrawxB2uAEYFMxFwk9BHhdxPNddKco-Fw,5399
23
23
  dbos/_fastapi.py,sha256=ke03vqsSYDnO6XeOtOVFXj0-f-v1MGsOxa9McaROvNc,3616
24
24
  dbos/_flask.py,sha256=DZKUZR5-xOzPI7tYZ53r2PvvHVoAb8SYwLzMVFsVfjI,2608
25
25
  dbos/_kafka.py,sha256=o6DbwnsYRDtvVTZVsN7BAK8cdP79AfoWX3Q7CGY2Yuo,4199
@@ -65,4 +65,4 @@ dbos/cli/cli.py,sha256=ThomRytw7EP5iOcrjEgwnpaWgXNTLfnFEBBvCGHxtJs,15590
65
65
  dbos/dbos-config.schema.json,sha256=HtF_njVTGHLdzBGZ4OrGQz3qbPPT0Go-iwd1PgFVTNg,5847
66
66
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
67
67
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
68
- dbos-0.24.0a5.dist-info/RECORD,,
68
+ dbos-0.24.0a6.dist-info/RECORD,,