dbos 0.27.0a4__py3-none-any.whl → 0.27.0a7__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/__init__.py CHANGED
@@ -1,6 +1,11 @@
1
1
  from . import _error as error
2
2
  from ._client import DBOSClient, EnqueueOptions
3
- from ._context import DBOSContextEnsure, DBOSContextSetAuth, SetWorkflowID
3
+ from ._context import (
4
+ DBOSContextEnsure,
5
+ DBOSContextSetAuth,
6
+ SetWorkflowID,
7
+ SetWorkflowTimeout,
8
+ )
4
9
  from ._dbos import DBOS, DBOSConfiguredInstance, WorkflowHandle, WorkflowHandleAsync
5
10
  from ._dbos_config import ConfigFile, DBOSConfig, get_dbos_database_url, load_config
6
11
  from ._kafka_message import KafkaMessage
@@ -19,6 +24,7 @@ __all__ = [
19
24
  "GetWorkflowsInput",
20
25
  "KafkaMessage",
21
26
  "SetWorkflowID",
27
+ "SetWorkflowTimeout",
22
28
  "WorkflowHandle",
23
29
  "WorkflowHandleAsync",
24
30
  "WorkflowStatus",
dbos/_admin_server.py CHANGED
@@ -209,7 +209,7 @@ class AdminRequestHandler(BaseHTTPRequestHandler):
209
209
  self._end_headers()
210
210
 
211
211
  def _handle_steps(self, workflow_id: str) -> None:
212
- steps = self.dbos._sys_db.get_workflow_steps(workflow_id)
212
+ steps = self.dbos.list_workflow_steps(workflow_id)
213
213
 
214
214
  updated_steps = [
215
215
  {
dbos/cli/cli.py CHANGED
@@ -372,7 +372,7 @@ def list(
372
372
  typer.Option(
373
373
  "--sort-desc",
374
374
  "-d",
375
- help="Sort the results in descending order",
375
+ help="Sort the results in descending order (older first)",
376
376
  ),
377
377
  ] = False,
378
378
  offset: Annotated[
@@ -442,7 +442,7 @@ def steps(
442
442
  help="Cancel a workflow so it is no longer automatically retried or restarted"
443
443
  )
444
444
  def cancel(
445
- uuid: Annotated[str, typer.Argument()],
445
+ workflow_id: Annotated[str, typer.Argument()],
446
446
  db_url: Annotated[
447
447
  typing.Optional[str],
448
448
  typer.Option(
@@ -452,12 +452,12 @@ def cancel(
452
452
  ),
453
453
  ] = None,
454
454
  ) -> None:
455
- start_client(db_url=db_url).cancel_workflow(workflow_id=uuid)
455
+ start_client(db_url=db_url).cancel_workflow(workflow_id=workflow_id)
456
456
 
457
457
 
458
458
  @workflow.command(help="Resume a workflow that has been cancelled")
459
459
  def resume(
460
- uuid: Annotated[str, typer.Argument()],
460
+ workflow_id: Annotated[str, typer.Argument()],
461
461
  db_url: Annotated[
462
462
  typing.Optional[str],
463
463
  typer.Option(
@@ -467,12 +467,12 @@ def resume(
467
467
  ),
468
468
  ] = None,
469
469
  ) -> None:
470
- start_client(db_url=db_url).resume_workflow(workflow_id=uuid)
470
+ start_client(db_url=db_url).resume_workflow(workflow_id=workflow_id)
471
471
 
472
472
 
473
473
  @workflow.command(help="Restart a workflow from the beginning with a new id")
474
474
  def restart(
475
- uuid: Annotated[str, typer.Argument()],
475
+ workflow_id: Annotated[str, typer.Argument()],
476
476
  db_url: Annotated[
477
477
  typing.Optional[str],
478
478
  typer.Option(
@@ -484,7 +484,7 @@ def restart(
484
484
  ) -> None:
485
485
  status = (
486
486
  start_client(db_url=db_url)
487
- .fork_workflow(workflow_id=uuid, start_step=1)
487
+ .fork_workflow(workflow_id=workflow_id, start_step=1)
488
488
  .get_status()
489
489
  )
490
490
  print(jsonpickle.encode(status, unpicklable=False))
@@ -494,13 +494,13 @@ def restart(
494
494
  help="fork a workflow from the beginning with a new id and from a step"
495
495
  )
496
496
  def fork(
497
- uuid: Annotated[str, typer.Argument()],
497
+ workflow_id: Annotated[str, typer.Argument()],
498
498
  step: Annotated[
499
499
  int,
500
500
  typer.Option(
501
501
  "--step",
502
502
  "-s",
503
- help="Restart from this step (default: first step)",
503
+ help="Restart from this step",
504
504
  ),
505
505
  ] = 1,
506
506
  db_url: Annotated[
@@ -514,7 +514,7 @@ def fork(
514
514
  ) -> None:
515
515
  status = (
516
516
  start_client(db_url=db_url)
517
- .fork_workflow(workflow_id=uuid, start_step=step)
517
+ .fork_workflow(workflow_id=workflow_id, start_step=step)
518
518
  .get_status()
519
519
  )
520
520
  print(jsonpickle.encode(status, unpicklable=False))
@@ -579,7 +579,7 @@ def list_queue(
579
579
  typer.Option(
580
580
  "--sort-desc",
581
581
  "-d",
582
- help="Sort the results in descending order",
582
+ help="Sort the results in descending order (older first)",
583
583
  ),
584
584
  ] = False,
585
585
  offset: Annotated[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.27.0a4
3
+ Version: 0.27.0a7
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,10 +1,10 @@
1
- dbos-0.27.0a4.dist-info/METADATA,sha256=d1z5uoV-xHOl-r59UtXlNYWrLMzIeZFQBCrAel7qStw,5553
2
- dbos-0.27.0a4.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- dbos-0.27.0a4.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-0.27.0a4.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
- dbos/__init__.py,sha256=HgYmqo90vIabiROcK5LaKXXT7KfqDARiI9dUUK9sww8,890
1
+ dbos-0.27.0a7.dist-info/METADATA,sha256=x0gUo28_7uSqvxSlc55rbak5_YyhphxwxcucIc25mSU,5553
2
+ dbos-0.27.0a7.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ dbos-0.27.0a7.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-0.27.0a7.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
+ dbos/__init__.py,sha256=BMphFT-WTxDDl2-tWefNhgXONLummlgNNTqkATw0iXM,957
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
- dbos/_admin_server.py,sha256=RrbABfR1D3p9c_QLrCSrgFuYce6FKi0fjMRIYLjO_Y8,9038
7
+ dbos/_admin_server.py,sha256=bR7hO8WS5hUzxjbDS3X0hXWuW8k3AQQSAvaynnthhtc,9031
8
8
  dbos/_app_db.py,sha256=3j8_5-MlSDY0otLRszFE-GfenU6JC20fcfSL-drSNYk,11800
9
9
  dbos/_classproperty.py,sha256=f0X-_BySzn3yFDRKB2JpCbLYQ9tLwt1XftfshvY7CBs,626
10
10
  dbos/_client.py,sha256=jMY73ymYKGr_nnjXfOgCB6adZhd4cQw7UWZmxt-iq6c,12574
@@ -62,8 +62,8 @@ dbos/_utils.py,sha256=nFRUHzVjXG5AusF85AlYHikj63Tzi-kQm992ihsrAxA,201
62
62
  dbos/_workflow_commands.py,sha256=7wyxTfIyh2IVIqlkaTr8CMBq8yxWP3Hhddyv1YJY8zE,3576
63
63
  dbos/cli/_github_init.py,sha256=Y_bDF9gfO2jB1id4FV5h1oIxEJRWyqVjhb7bNEa5nQ0,3224
64
64
  dbos/cli/_template_init.py,sha256=-WW3kbq0W_Tq4WbMqb1UGJG3xvJb3woEY5VspG95Srk,2857
65
- dbos/cli/cli.py,sha256=2-409xvOaYzKu_Bd4LhHSihXjczzq6do5TANHIVGAts,18820
65
+ dbos/cli/cli.py,sha256=a3rUrHog5-e22KjjUPOuTjH20PmUgSP0amRpMd6LVJE,18882
66
66
  dbos/dbos-config.schema.json,sha256=8KcwJb_sQc4-6tQG2TLmjE_nratfrQa0qVLl9XPsvWE,6367
67
67
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
68
68
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
69
- dbos-0.27.0a4.dist-info/RECORD,,
69
+ dbos-0.27.0a7.dist-info/RECORD,,