dbos 0.26.0a1__py3-none-any.whl → 0.26.0a3__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/_admin_server.py CHANGED
@@ -9,6 +9,7 @@ from typing import TYPE_CHECKING, Any, List, TypedDict
9
9
 
10
10
  from ._logger import dbos_logger
11
11
  from ._recovery import recover_pending_workflows
12
+ from ._utils import GlobalParams
12
13
 
13
14
  if TYPE_CHECKING:
14
15
  from ._dbos import DBOS
@@ -44,6 +45,7 @@ class AdminServer:
44
45
  class AdminRequestHandler(BaseHTTPRequestHandler):
45
46
  def __init__(self, dbos: DBOS, *args: Any, **kwargs: Any) -> None:
46
47
  self.dbos = dbos
48
+ self.is_deactivated = False
47
49
  super().__init__(*args, **kwargs)
48
50
 
49
51
  def _end_headers(self) -> None:
@@ -59,10 +61,14 @@ class AdminRequestHandler(BaseHTTPRequestHandler):
59
61
  self._end_headers()
60
62
  self.wfile.write("healthy".encode("utf-8"))
61
63
  elif self.path == _deactivate_path:
64
+ if not self.is_deactivated:
65
+ dbos_logger.info(
66
+ f"Deactivating DBOS executor {GlobalParams.executor_id} with version {GlobalParams.app_version}. This executor will complete existing workflows but will not start new workflows."
67
+ )
68
+ self.is_deactivated = True
62
69
  # Stop all scheduled workflows, queues, and kafka loops
63
70
  for event in self.dbos.stop_events:
64
71
  event.set()
65
-
66
72
  self.send_response(200)
67
73
  self._end_headers()
68
74
  self.wfile.write("deactivated".encode("utf-8"))
dbos/_client.py CHANGED
@@ -22,10 +22,9 @@ R = TypeVar("R", covariant=True) # A generic type for workflow return values
22
22
 
23
23
  class EnqueueOptions(TypedDict):
24
24
  workflow_name: str
25
- workflow_class_name: NotRequired[str]
26
25
  queue_name: str
27
- app_version: NotRequired[str]
28
26
  workflow_id: NotRequired[str]
27
+ app_version: NotRequired[str]
29
28
 
30
29
 
31
30
  class WorkflowHandleClientPolling(Generic[R]):
@@ -86,7 +85,6 @@ class DBOSClient:
86
85
  workflow_name = options["workflow_name"]
87
86
  queue_name = options["queue_name"]
88
87
 
89
- workflow_class_name = options.get("workflow_class_name")
90
88
  app_version = options.get("app_version")
91
89
  max_recovery_attempts = options.get("max_recovery_attempts")
92
90
  if max_recovery_attempts is None:
@@ -99,7 +97,7 @@ class DBOSClient:
99
97
  "workflow_uuid": workflow_id,
100
98
  "status": WorkflowStatusString.ENQUEUED.value,
101
99
  "name": workflow_name,
102
- "class_name": workflow_class_name,
100
+ "class_name": None,
103
101
  "queue_name": queue_name,
104
102
  "app_version": app_version,
105
103
  "config_name": None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.26.0a1
3
+ Version: 0.26.0a3
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,13 +1,13 @@
1
- dbos-0.26.0a1.dist-info/METADATA,sha256=ziHAfEpwbBK6AKLbucZsDQNvMbYjgdfP8b9dp-NJE-8,5553
2
- dbos-0.26.0a1.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- dbos-0.26.0a1.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-0.26.0a1.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-0.26.0a3.dist-info/METADATA,sha256=0Mkwde0BUtfYGHbfTxX_86tO7W6B_r2SqJktrNul4b0,5553
2
+ dbos-0.26.0a3.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ dbos-0.26.0a3.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-0.26.0a3.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=3NQfGlBiiUSM_v88STdVP3rNZvGkUL_9WbSotKb8Voo,873
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
- dbos/_admin_server.py,sha256=FLUacm9WGIPjB5s3QhdpMCilc8JHJOF0KMNStF82qs0,6625
7
+ dbos/_admin_server.py,sha256=vxPG_YJ6lYrkfPCSp42FiATVLBOij7Fm52Yngg5Z_tE,7027
8
8
  dbos/_app_db.py,sha256=R3sbh--84A4i-dTz8IXYmxO4b4s5VSwiPQvi_le52mg,6109
9
9
  dbos/_classproperty.py,sha256=f0X-_BySzn3yFDRKB2JpCbLYQ9tLwt1XftfshvY7CBs,626
10
- dbos/_client.py,sha256=XKjR0a3JA9Xfo9VJx48EcdyiVDaA10FvI7Y_I1v27Ng,7384
10
+ dbos/_client.py,sha256=fzW_Gagh-oyWyDYtREcQDBesoVl_LsEoMeJAsn5-C5s,7262
11
11
  dbos/_cloudutils/authentication.py,sha256=V0fCWQN9stCkhbuuxgPTGpvuQcDqfU3KAxPAh01vKW4,5007
12
12
  dbos/_cloudutils/cloudutils.py,sha256=YC7jGsIopT0KveLsqbRpQk2KlRBk-nIRC_UCgep4f3o,7797
13
13
  dbos/_cloudutils/databases.py,sha256=_shqaqSvhY4n2ScgQ8IP5PDZvzvcx3YBKV8fj-cxhSY,8543
@@ -67,4 +67,4 @@ dbos/cli/cli.py,sha256=G55sZJxfmvUGvWr0hoIWwVZBy-fJdpCsTsZmuHT1CjA,16049
67
67
  dbos/dbos-config.schema.json,sha256=4z2OXPfp7H0uNT1m5dKxjg31qbAfPyKkFXwHufuUMec,5910
68
68
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
69
69
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
70
- dbos-0.26.0a1.dist-info/RECORD,,
70
+ dbos-0.26.0a3.dist-info/RECORD,,