dbos 2.3.0a2__py3-none-any.whl → 2.3.0a4__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 +0 -21
- dbos/_dbos_config.py +0 -2
- dbos/cli/cli.py +1 -15
- {dbos-2.3.0a2.dist-info → dbos-2.3.0a4.dist-info}/METADATA +1 -1
- {dbos-2.3.0a2.dist-info → dbos-2.3.0a4.dist-info}/RECORD +8 -8
- {dbos-2.3.0a2.dist-info → dbos-2.3.0a4.dist-info}/WHEEL +0 -0
- {dbos-2.3.0a2.dist-info → dbos-2.3.0a4.dist-info}/entry_points.txt +0 -0
- {dbos-2.3.0a2.dist-info → dbos-2.3.0a4.dist-info}/licenses/LICENSE +0 -0
dbos/_core.py
CHANGED
|
@@ -93,14 +93,6 @@ TEMP_SEND_WF_NAME = "<temp>.temp_send_workflow"
|
|
|
93
93
|
DEBOUNCER_WORKFLOW_NAME = "_dbos_debouncer_workflow"
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
def check_is_in_coroutine() -> bool:
|
|
97
|
-
try:
|
|
98
|
-
asyncio.get_running_loop()
|
|
99
|
-
return True
|
|
100
|
-
except RuntimeError:
|
|
101
|
-
return False
|
|
102
|
-
|
|
103
|
-
|
|
104
96
|
class WorkflowHandleFuture(Generic[R]):
|
|
105
97
|
|
|
106
98
|
def __init__(self, workflow_id: str, future: Future[R], dbos: "DBOS"):
|
|
@@ -856,11 +848,6 @@ def workflow_wrapper(
|
|
|
856
848
|
dbos._sys_db.record_get_result(workflow_id, serialized_r, None)
|
|
857
849
|
return r
|
|
858
850
|
|
|
859
|
-
if check_is_in_coroutine() and not inspect.iscoroutinefunction(func):
|
|
860
|
-
dbos_logger.warning(
|
|
861
|
-
f"Sync workflow ({get_dbos_func_name(func)}) shouldn't be invoked from within another async function. Define it as async or use asyncio.to_thread instead."
|
|
862
|
-
)
|
|
863
|
-
|
|
864
851
|
outcome = (
|
|
865
852
|
wfOutcome.wrap(init_wf, dbos=dbos)
|
|
866
853
|
.also(DBOSAssumeRole(rr))
|
|
@@ -1046,10 +1033,6 @@ def decorate_transaction(
|
|
|
1046
1033
|
assert (
|
|
1047
1034
|
ctx.is_workflow()
|
|
1048
1035
|
), "Transactions must be called from within workflows"
|
|
1049
|
-
if check_is_in_coroutine():
|
|
1050
|
-
dbos_logger.warning(
|
|
1051
|
-
f"Transaction function ({get_dbos_func_name(func)}) shouldn't be invoked from within another async function. Use asyncio.to_thread instead."
|
|
1052
|
-
)
|
|
1053
1036
|
with DBOSAssumeRole(rr):
|
|
1054
1037
|
return invoke_tx(*args, **kwargs)
|
|
1055
1038
|
else:
|
|
@@ -1194,10 +1177,6 @@ def decorate_step(
|
|
|
1194
1177
|
|
|
1195
1178
|
@wraps(func)
|
|
1196
1179
|
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
1197
|
-
if check_is_in_coroutine() and not inspect.iscoroutinefunction(func):
|
|
1198
|
-
dbos_logger.warning(
|
|
1199
|
-
f"Sync step ({get_dbos_func_name(func)}) shouldn't be invoked from within another async function. Define it as async or use asyncio.to_thread instead."
|
|
1200
|
-
)
|
|
1201
1180
|
# If the step is called from a workflow, run it as a step.
|
|
1202
1181
|
# Otherwise, run it as a normal function.
|
|
1203
1182
|
ctx = get_local_dbos_context()
|
dbos/_dbos_config.py
CHANGED
|
@@ -478,8 +478,6 @@ def is_valid_database_url(database_url: str) -> bool:
|
|
|
478
478
|
return True
|
|
479
479
|
url = make_url(database_url)
|
|
480
480
|
required_fields = [
|
|
481
|
-
("username", "Username must be specified in the connection URL"),
|
|
482
|
-
("host", "Host must be specified in the connection URL"),
|
|
483
481
|
("database", "Database name must be specified in the connection URL"),
|
|
484
482
|
]
|
|
485
483
|
for field_name, error_message in required_fields:
|
dbos/cli/cli.py
CHANGED
|
@@ -140,26 +140,12 @@ def start() -> None:
|
|
|
140
140
|
Forward kill signals to children.
|
|
141
141
|
|
|
142
142
|
When we receive a signal, send it to the entire process group of the child.
|
|
143
|
-
If that doesn't work, SIGKILL them then exit.
|
|
144
143
|
"""
|
|
145
144
|
# Send the signal to the child's entire process group
|
|
146
145
|
if process.poll() is None:
|
|
147
146
|
os.killpg(os.getpgid(process.pid), signum)
|
|
148
147
|
|
|
149
|
-
#
|
|
150
|
-
for _ in range(10): # Wait up to 1 second
|
|
151
|
-
if process.poll() is not None:
|
|
152
|
-
break
|
|
153
|
-
time.sleep(0.1)
|
|
154
|
-
|
|
155
|
-
# If the child is still running, force kill it
|
|
156
|
-
if process.poll() is None:
|
|
157
|
-
try:
|
|
158
|
-
os.killpg(os.getpgid(process.pid), signal.SIGKILL)
|
|
159
|
-
except Exception:
|
|
160
|
-
pass
|
|
161
|
-
|
|
162
|
-
# Exit immediately
|
|
148
|
+
# Exit
|
|
163
149
|
os._exit(process.returncode if process.returncode is not None else 1)
|
|
164
150
|
|
|
165
151
|
# Configure the single handler only on Unix-like systems.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-2.3.
|
|
2
|
-
dbos-2.3.
|
|
3
|
-
dbos-2.3.
|
|
4
|
-
dbos-2.3.
|
|
1
|
+
dbos-2.3.0a4.dist-info/METADATA,sha256=bNVzQwEXHySnbyTr_mjNe3K0lwYJS0w6ttLL5Onhf6g,14532
|
|
2
|
+
dbos-2.3.0a4.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
dbos-2.3.0a4.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
|
|
4
|
+
dbos-2.3.0a4.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=M7FdFSBGhcvaLIXrNw_0eR68ijwMWV7_UEyimHMP_F4,1039
|
|
6
6
|
dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
|
|
7
7
|
dbos/_admin_server.py,sha256=hubQJw5T8zGKCPNS6FQTXy8jQ8GTJxoYQaDTMlICl9k,16267
|
|
@@ -11,10 +11,10 @@ dbos/_client.py,sha256=0VR9oWBn0i-34jNWHqkgeImKdg5aBefMWu2jaqRLH8Q,19658
|
|
|
11
11
|
dbos/_conductor/conductor.py,sha256=3E_hL3c9g9yWqKZkvI6KA0-ZzPMPRo06TOzT1esMiek,24114
|
|
12
12
|
dbos/_conductor/protocol.py,sha256=q3rgLxINFtWFigdOONc-4gX4vn66UmMlJQD6Kj8LnL4,7420
|
|
13
13
|
dbos/_context.py,sha256=XKllmsDR_oMcWOuZnoe1X4yv2JeOi_vsAuyWC-mWs_o,28164
|
|
14
|
-
dbos/_core.py,sha256=
|
|
14
|
+
dbos/_core.py,sha256=e-pKDbrvpN6BzcfyIZx4Nsb8wnMiGxLNzdpgtlRI-0I,50096
|
|
15
15
|
dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
|
|
16
16
|
dbos/_dbos.py,sha256=dr32Z_NT36JkUxWGyYVX7xkl3bYJmgsxVMOX8H9_mpM,59394
|
|
17
|
-
dbos/_dbos_config.py,sha256=
|
|
17
|
+
dbos/_dbos_config.py,sha256=mfajyeyeV1ZHaAg2GU3dxwvp_19wZtY2prNdVrXgPb8,24846
|
|
18
18
|
dbos/_debouncer.py,sha256=qNjIVmWqTPp64M2cEbLnpgGmlKVdCaAKysD1BPJgWh4,15297
|
|
19
19
|
dbos/_debug.py,sha256=0MfgNqutCUhI4PEmmra9x7f3DiFE_0nscfUCHdLimEY,1415
|
|
20
20
|
dbos/_docker_pg_helper.py,sha256=xySum4hTA8TVMBODoG19u4cXQAB1vCock-jwM2pnmSI,7791
|
|
@@ -51,9 +51,9 @@ dbos/_utils.py,sha256=ZdoM1MDbHnlJrh31zfhp3iX62bAxK1kyvMwXnltC_84,1779
|
|
|
51
51
|
dbos/_workflow_commands.py,sha256=k-i1bCfNrux43BHLT8wQ-l-MVZX3D6LGZLH7-uuiDRo,4951
|
|
52
52
|
dbos/cli/_github_init.py,sha256=R_94Fnn40CAmPy-zM00lwHi0ndyfv57TmIooADjmag4,3378
|
|
53
53
|
dbos/cli/_template_init.py,sha256=AltKk256VocgvxLpuTxpjJyACrdHFjbGoqYhHzeLae4,2649
|
|
54
|
-
dbos/cli/cli.py,sha256=
|
|
54
|
+
dbos/cli/cli.py,sha256=hPZJmrQZWn8mcXou7DHaHl8luSEQTEWaYlnIsLw8WY4,27150
|
|
55
55
|
dbos/cli/migration.py,sha256=I0_0ngWTuCPQf6Symbpd0lizaxWUKe3uTYEmuCmsrdU,3775
|
|
56
56
|
dbos/dbos-config.schema.json,sha256=47wofTZ5jlFynec7bG0L369tAXbRQQ2euBxBXvg4m9c,1730
|
|
57
57
|
dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
|
|
58
58
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
59
|
-
dbos-2.3.
|
|
59
|
+
dbos-2.3.0a4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|