dbos 1.6.0a3__py3-none-any.whl → 1.6.0a5__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/_context.py +5 -11
- dbos/_core.py +41 -32
- dbos/_dbos.py +17 -4
- dbos/_kafka.py +2 -1
- dbos/_registrations.py +5 -3
- dbos/_roles.py +3 -2
- dbos/_scheduler.py +11 -8
- {dbos-1.6.0a3.dist-info → dbos-1.6.0a5.dist-info}/METADATA +1 -1
- {dbos-1.6.0a3.dist-info → dbos-1.6.0a5.dist-info}/RECORD +12 -12
- {dbos-1.6.0a3.dist-info → dbos-1.6.0a5.dist-info}/WHEEL +0 -0
- {dbos-1.6.0a3.dist-info → dbos-1.6.0a5.dist-info}/entry_points.txt +0 -0
- {dbos-1.6.0a3.dist-info → dbos-1.6.0a5.dist-info}/licenses/LICENSE +0 -0
dbos/_context.py
CHANGED
@@ -140,23 +140,18 @@ class DBOSContext:
|
|
140
140
|
self,
|
141
141
|
wfid: Optional[str],
|
142
142
|
attributes: TracedAttributes,
|
143
|
-
is_temp_workflow: bool = False,
|
144
143
|
) -> None:
|
145
144
|
if wfid is None or len(wfid) == 0:
|
146
145
|
wfid = self.assign_workflow_id()
|
147
146
|
self.id_assigned_for_next_workflow = ""
|
148
147
|
self.workflow_id = wfid
|
149
148
|
self.function_id = 0
|
150
|
-
|
151
|
-
self._start_span(attributes)
|
149
|
+
self._start_span(attributes)
|
152
150
|
|
153
|
-
def end_workflow(
|
154
|
-
self, exc_value: Optional[BaseException], is_temp_workflow: bool = False
|
155
|
-
) -> None:
|
151
|
+
def end_workflow(self, exc_value: Optional[BaseException]) -> None:
|
156
152
|
self.workflow_id = ""
|
157
153
|
self.function_id = -1
|
158
|
-
|
159
|
-
self._end_span(exc_value)
|
154
|
+
self._end_span(exc_value)
|
160
155
|
|
161
156
|
def is_within_workflow(self) -> bool:
|
162
157
|
return len(self.workflow_id) > 0
|
@@ -490,7 +485,6 @@ class EnterDBOSWorkflow(AbstractContextManager[DBOSContext, Literal[False]]):
|
|
490
485
|
def __init__(self, attributes: TracedAttributes) -> None:
|
491
486
|
self.created_ctx = False
|
492
487
|
self.attributes = attributes
|
493
|
-
self.is_temp_workflow = attributes["name"] == "temp_wf"
|
494
488
|
self.saved_workflow_timeout: Optional[int] = None
|
495
489
|
self.saved_deduplication_id: Optional[str] = None
|
496
490
|
self.saved_priority: Optional[int] = None
|
@@ -514,7 +508,7 @@ class EnterDBOSWorkflow(AbstractContextManager[DBOSContext, Literal[False]]):
|
|
514
508
|
self.saved_priority = ctx.priority
|
515
509
|
ctx.priority = None
|
516
510
|
ctx.start_workflow(
|
517
|
-
None, self.attributes
|
511
|
+
None, self.attributes
|
518
512
|
) # Will get from the context's next workflow ID
|
519
513
|
return ctx
|
520
514
|
|
@@ -526,7 +520,7 @@ class EnterDBOSWorkflow(AbstractContextManager[DBOSContext, Literal[False]]):
|
|
526
520
|
) -> Literal[False]:
|
527
521
|
ctx = assert_current_dbos_context()
|
528
522
|
assert ctx.is_within_workflow()
|
529
|
-
ctx.end_workflow(exc_value
|
523
|
+
ctx.end_workflow(exc_value)
|
530
524
|
# Restore the saved workflow timeout
|
531
525
|
ctx.workflow_timeout_ms = self.saved_workflow_timeout
|
532
526
|
# Clear any propagating timeout
|
dbos/_core.py
CHANGED
@@ -392,7 +392,7 @@ def _execute_workflow_wthread(
|
|
392
392
|
**kwargs: Any,
|
393
393
|
) -> R:
|
394
394
|
attributes: TracedAttributes = {
|
395
|
-
"name": func
|
395
|
+
"name": get_dbos_func_name(func),
|
396
396
|
"operationType": OperationType.WORKFLOW.value,
|
397
397
|
}
|
398
398
|
with DBOSContextSwap(ctx):
|
@@ -425,7 +425,7 @@ async def _execute_workflow_async(
|
|
425
425
|
**kwargs: Any,
|
426
426
|
) -> R:
|
427
427
|
attributes: TracedAttributes = {
|
428
|
-
"name": func
|
428
|
+
"name": get_dbos_func_name(func),
|
429
429
|
"operationType": OperationType.WORKFLOW.value,
|
430
430
|
}
|
431
431
|
with DBOSContextSwap(ctx):
|
@@ -532,7 +532,8 @@ def start_workflow(
|
|
532
532
|
fi = get_func_info(func)
|
533
533
|
if fi is None:
|
534
534
|
raise DBOSWorkflowFunctionNotFoundError(
|
535
|
-
"<NONE>",
|
535
|
+
"<NONE>",
|
536
|
+
f"start_workflow: function {func.__name__} is not registered",
|
536
537
|
)
|
537
538
|
|
538
539
|
func = cast("Workflow[P, R]", func.__orig_func) # type: ignore
|
@@ -627,7 +628,8 @@ async def start_workflow_async(
|
|
627
628
|
fi = get_func_info(func)
|
628
629
|
if fi is None:
|
629
630
|
raise DBOSWorkflowFunctionNotFoundError(
|
630
|
-
"<NONE>",
|
631
|
+
"<NONE>",
|
632
|
+
f"start_workflow: function {func.__name__} is not registered",
|
631
633
|
)
|
632
634
|
|
633
635
|
func = cast("Workflow[P, R]", func.__orig_func) # type: ignore
|
@@ -731,13 +733,13 @@ def workflow_wrapper(
|
|
731
733
|
assert fi is not None
|
732
734
|
if dbosreg.dbos is None:
|
733
735
|
raise DBOSException(
|
734
|
-
f"Function {func
|
736
|
+
f"Function {get_dbos_func_name(func)} invoked before DBOS initialized"
|
735
737
|
)
|
736
738
|
dbos = dbosreg.dbos
|
737
739
|
|
738
740
|
rr: Optional[str] = check_required_roles(func, fi)
|
739
741
|
attributes: TracedAttributes = {
|
740
|
-
"name": func
|
742
|
+
"name": get_dbos_func_name(func),
|
741
743
|
"operationType": OperationType.WORKFLOW.value,
|
742
744
|
}
|
743
745
|
inputs: WorkflowInputs = {
|
@@ -837,27 +839,30 @@ def workflow_wrapper(
|
|
837
839
|
|
838
840
|
|
839
841
|
def decorate_workflow(
|
840
|
-
reg: "DBOSRegistry", max_recovery_attempts: Optional[int]
|
842
|
+
reg: "DBOSRegistry", name: Optional[str], max_recovery_attempts: Optional[int]
|
841
843
|
) -> Callable[[Callable[P, R]], Callable[P, R]]:
|
842
844
|
def _workflow_decorator(func: Callable[P, R]) -> Callable[P, R]:
|
843
845
|
wrapped_func = workflow_wrapper(reg, func, max_recovery_attempts)
|
844
|
-
|
846
|
+
func_name = name if name is not None else func.__qualname__
|
847
|
+
set_dbos_func_name(func, func_name)
|
848
|
+
set_dbos_func_name(wrapped_func, func_name)
|
849
|
+
reg.register_wf_function(func_name, wrapped_func, "workflow")
|
845
850
|
return wrapped_func
|
846
851
|
|
847
852
|
return _workflow_decorator
|
848
853
|
|
849
854
|
|
850
855
|
def decorate_transaction(
|
851
|
-
dbosreg: "DBOSRegistry", isolation_level: "IsolationLevel"
|
856
|
+
dbosreg: "DBOSRegistry", name: Optional[str], isolation_level: "IsolationLevel"
|
852
857
|
) -> Callable[[F], F]:
|
853
858
|
def decorator(func: F) -> F:
|
854
859
|
|
855
|
-
transaction_name = func.__qualname__
|
860
|
+
transaction_name = name if name is not None else func.__qualname__
|
856
861
|
|
857
862
|
def invoke_tx(*args: Any, **kwargs: Any) -> Any:
|
858
863
|
if dbosreg.dbos is None:
|
859
864
|
raise DBOSException(
|
860
|
-
f"Function {
|
865
|
+
f"Function {transaction_name} invoked before DBOS initialized"
|
861
866
|
)
|
862
867
|
|
863
868
|
dbos = dbosreg.dbos
|
@@ -865,12 +870,12 @@ def decorate_transaction(
|
|
865
870
|
status = dbos._sys_db.get_workflow_status(ctx.workflow_id)
|
866
871
|
if status and status["status"] == WorkflowStatusString.CANCELLED.value:
|
867
872
|
raise DBOSWorkflowCancelledError(
|
868
|
-
f"Workflow {ctx.workflow_id} is cancelled. Aborting transaction {
|
873
|
+
f"Workflow {ctx.workflow_id} is cancelled. Aborting transaction {transaction_name}."
|
869
874
|
)
|
870
875
|
|
871
876
|
with dbos._app_db.sessionmaker() as session:
|
872
877
|
attributes: TracedAttributes = {
|
873
|
-
"name":
|
878
|
+
"name": transaction_name,
|
874
879
|
"operationType": OperationType.TRANSACTION.value,
|
875
880
|
}
|
876
881
|
with EnterDBOSTransaction(session, attributes=attributes):
|
@@ -971,7 +976,7 @@ def decorate_transaction(
|
|
971
976
|
raise
|
972
977
|
except InvalidRequestError as invalid_request_error:
|
973
978
|
dbos.logger.error(
|
974
|
-
f"InvalidRequestError in transaction {
|
979
|
+
f"InvalidRequestError in transaction {transaction_name} \033[1m Hint: Do not call commit() or rollback() within a DBOS transaction.\033[0m"
|
975
980
|
)
|
976
981
|
txn_error = invalid_request_error
|
977
982
|
raise
|
@@ -991,7 +996,7 @@ def decorate_transaction(
|
|
991
996
|
|
992
997
|
if inspect.iscoroutinefunction(func):
|
993
998
|
raise DBOSException(
|
994
|
-
f"Function {
|
999
|
+
f"Function {transaction_name} is a coroutine function, but DBOS.transaction does not support coroutine functions"
|
995
1000
|
)
|
996
1001
|
|
997
1002
|
fi = get_or_create_func_info(func)
|
@@ -1010,15 +1015,19 @@ def decorate_transaction(
|
|
1010
1015
|
with DBOSAssumeRole(rr):
|
1011
1016
|
return invoke_tx(*args, **kwargs)
|
1012
1017
|
else:
|
1013
|
-
tempwf = dbosreg.workflow_info_map.get("<temp>." +
|
1018
|
+
tempwf = dbosreg.workflow_info_map.get("<temp>." + transaction_name)
|
1014
1019
|
assert tempwf
|
1015
1020
|
return tempwf(*args, **kwargs)
|
1016
1021
|
|
1022
|
+
set_dbos_func_name(func, transaction_name)
|
1023
|
+
set_dbos_func_name(wrapper, transaction_name)
|
1024
|
+
|
1017
1025
|
def temp_wf(*args: Any, **kwargs: Any) -> Any:
|
1018
1026
|
return wrapper(*args, **kwargs)
|
1019
1027
|
|
1020
1028
|
wrapped_wf = workflow_wrapper(dbosreg, temp_wf)
|
1021
|
-
set_dbos_func_name(temp_wf, "<temp>." +
|
1029
|
+
set_dbos_func_name(temp_wf, "<temp>." + transaction_name)
|
1030
|
+
set_dbos_func_name(wrapped_wf, "<temp>." + transaction_name)
|
1022
1031
|
set_temp_workflow_type(temp_wf, "transaction")
|
1023
1032
|
dbosreg.register_wf_function(
|
1024
1033
|
get_dbos_func_name(temp_wf), wrapped_wf, "transaction"
|
@@ -1035,24 +1044,25 @@ def decorate_transaction(
|
|
1035
1044
|
def decorate_step(
|
1036
1045
|
dbosreg: "DBOSRegistry",
|
1037
1046
|
*,
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1047
|
+
name: Optional[str],
|
1048
|
+
retries_allowed: bool,
|
1049
|
+
interval_seconds: float,
|
1050
|
+
max_attempts: int,
|
1051
|
+
backoff_rate: float,
|
1042
1052
|
) -> Callable[[Callable[P, R]], Callable[P, R]]:
|
1043
1053
|
def decorator(func: Callable[P, R]) -> Callable[P, R]:
|
1044
1054
|
|
1045
|
-
step_name = func.__qualname__
|
1055
|
+
step_name = name if name is not None else func.__qualname__
|
1046
1056
|
|
1047
1057
|
def invoke_step(*args: Any, **kwargs: Any) -> Any:
|
1048
1058
|
if dbosreg.dbos is None:
|
1049
1059
|
raise DBOSException(
|
1050
|
-
f"Function {
|
1060
|
+
f"Function {step_name} invoked before DBOS initialized"
|
1051
1061
|
)
|
1052
1062
|
dbos = dbosreg.dbos
|
1053
1063
|
|
1054
1064
|
attributes: TracedAttributes = {
|
1055
|
-
"name":
|
1065
|
+
"name": step_name,
|
1056
1066
|
"operationType": OperationType.STEP.value,
|
1057
1067
|
}
|
1058
1068
|
|
@@ -1131,7 +1141,7 @@ def decorate_step(
|
|
1131
1141
|
stepOutcome = stepOutcome.retry(
|
1132
1142
|
max_attempts,
|
1133
1143
|
on_exception,
|
1134
|
-
lambda i, e: DBOSMaxStepRetriesExceeded(
|
1144
|
+
lambda i, e: DBOSMaxStepRetriesExceeded(step_name, i, e),
|
1135
1145
|
)
|
1136
1146
|
|
1137
1147
|
outcome = (
|
@@ -1160,7 +1170,7 @@ def decorate_step(
|
|
1160
1170
|
with DBOSAssumeRole(rr):
|
1161
1171
|
return invoke_step(*args, **kwargs)
|
1162
1172
|
else:
|
1163
|
-
tempwf = dbosreg.workflow_info_map.get("<temp>." +
|
1173
|
+
tempwf = dbosreg.workflow_info_map.get("<temp>." + step_name)
|
1164
1174
|
assert tempwf
|
1165
1175
|
return tempwf(*args, **kwargs)
|
1166
1176
|
|
@@ -1168,20 +1178,19 @@ def decorate_step(
|
|
1168
1178
|
_mark_coroutine(wrapper) if inspect.iscoroutinefunction(func) else wrapper # type: ignore
|
1169
1179
|
)
|
1170
1180
|
|
1181
|
+
set_dbos_func_name(func, step_name)
|
1182
|
+
set_dbos_func_name(wrapper, step_name)
|
1183
|
+
|
1171
1184
|
def temp_wf_sync(*args: Any, **kwargs: Any) -> Any:
|
1172
1185
|
return wrapper(*args, **kwargs)
|
1173
1186
|
|
1174
1187
|
async def temp_wf_async(*args: Any, **kwargs: Any) -> Any:
|
1175
1188
|
return await wrapper(*args, **kwargs)
|
1176
1189
|
|
1177
|
-
# Other code in transact-py depends on the name of temporary workflow functions to be "temp_wf"
|
1178
|
-
# so set the name of both sync and async temporary workflow functions explicitly
|
1179
|
-
temp_wf_sync.__name__ = "temp_wf"
|
1180
|
-
temp_wf_async.__name__ = "temp_wf"
|
1181
|
-
|
1182
1190
|
temp_wf = temp_wf_async if inspect.iscoroutinefunction(func) else temp_wf_sync
|
1183
1191
|
wrapped_wf = workflow_wrapper(dbosreg, temp_wf)
|
1184
|
-
set_dbos_func_name(temp_wf, "<temp>." +
|
1192
|
+
set_dbos_func_name(temp_wf, "<temp>." + step_name)
|
1193
|
+
set_dbos_func_name(wrapped_wf, "<temp>." + step_name)
|
1185
1194
|
set_temp_workflow_type(temp_wf, "step")
|
1186
1195
|
dbosreg.register_wf_function(get_dbos_func_name(temp_wf), wrapped_wf, "step")
|
1187
1196
|
wrapper.__orig_func = temp_wf # type: ignore
|
dbos/_dbos.py
CHANGED
@@ -360,6 +360,7 @@ class DBOS:
|
|
360
360
|
|
361
361
|
temp_send_wf = workflow_wrapper(self._registry, send_temp_workflow)
|
362
362
|
set_dbos_func_name(send_temp_workflow, TEMP_SEND_WF_NAME)
|
363
|
+
set_dbos_func_name(temp_send_wf, TEMP_SEND_WF_NAME)
|
363
364
|
set_temp_workflow_type(send_temp_workflow, "send")
|
364
365
|
self._registry.register_wf_function(TEMP_SEND_WF_NAME, temp_send_wf, "send")
|
365
366
|
|
@@ -589,14 +590,22 @@ class DBOS:
|
|
589
590
|
# Decorators for DBOS functionality
|
590
591
|
@classmethod
|
591
592
|
def workflow(
|
592
|
-
cls,
|
593
|
+
cls,
|
594
|
+
*,
|
595
|
+
name: Optional[str] = None,
|
596
|
+
max_recovery_attempts: Optional[int] = DEFAULT_MAX_RECOVERY_ATTEMPTS,
|
593
597
|
) -> Callable[[Callable[P, R]], Callable[P, R]]:
|
594
598
|
"""Decorate a function for use as a DBOS workflow."""
|
595
|
-
return decorate_workflow(
|
599
|
+
return decorate_workflow(
|
600
|
+
_get_or_create_dbos_registry(), name, max_recovery_attempts
|
601
|
+
)
|
596
602
|
|
597
603
|
@classmethod
|
598
604
|
def transaction(
|
599
|
-
cls,
|
605
|
+
cls,
|
606
|
+
isolation_level: IsolationLevel = "SERIALIZABLE",
|
607
|
+
*,
|
608
|
+
name: Optional[str] = None,
|
600
609
|
) -> Callable[[F], F]:
|
601
610
|
"""
|
602
611
|
Decorate a function for use as a DBOS transaction.
|
@@ -605,12 +614,15 @@ class DBOS:
|
|
605
614
|
isolation_level(IsolationLevel): Transaction isolation level
|
606
615
|
|
607
616
|
"""
|
608
|
-
return decorate_transaction(
|
617
|
+
return decorate_transaction(
|
618
|
+
_get_or_create_dbos_registry(), name, isolation_level
|
619
|
+
)
|
609
620
|
|
610
621
|
@classmethod
|
611
622
|
def step(
|
612
623
|
cls,
|
613
624
|
*,
|
625
|
+
name: Optional[str] = None,
|
614
626
|
retries_allowed: bool = False,
|
615
627
|
interval_seconds: float = 1.0,
|
616
628
|
max_attempts: int = 3,
|
@@ -629,6 +641,7 @@ class DBOS:
|
|
629
641
|
|
630
642
|
return decorate_step(
|
631
643
|
_get_or_create_dbos_registry(),
|
644
|
+
name=name,
|
632
645
|
retries_allowed=retries_allowed,
|
633
646
|
interval_seconds=interval_seconds,
|
634
647
|
max_attempts=max_attempts,
|
dbos/_kafka.py
CHANGED
@@ -13,6 +13,7 @@ from ._context import SetWorkflowID
|
|
13
13
|
from ._error import DBOSInitializationError
|
14
14
|
from ._kafka_message import KafkaMessage
|
15
15
|
from ._logger import dbos_logger
|
16
|
+
from ._registrations import get_dbos_func_name
|
16
17
|
|
17
18
|
_KafkaConsumerWorkflow = Callable[[KafkaMessage], None]
|
18
19
|
|
@@ -44,7 +45,7 @@ def _kafka_consumer_loop(
|
|
44
45
|
config["auto.offset.reset"] = "earliest"
|
45
46
|
|
46
47
|
if config.get("group.id") is None:
|
47
|
-
config["group.id"] = safe_group_name(func
|
48
|
+
config["group.id"] = safe_group_name(get_dbos_func_name(func), topics)
|
48
49
|
dbos_logger.warning(
|
49
50
|
f"Consumer group ID not found. Using generated group.id {config['group.id']}"
|
50
51
|
)
|
dbos/_registrations.py
CHANGED
@@ -4,15 +4,17 @@ from enum import Enum
|
|
4
4
|
from types import FunctionType
|
5
5
|
from typing import Any, Callable, List, Literal, Optional, Tuple, Type, cast
|
6
6
|
|
7
|
+
from dbos._error import DBOSWorkflowFunctionNotFoundError
|
8
|
+
|
7
9
|
DEFAULT_MAX_RECOVERY_ATTEMPTS = 100
|
8
10
|
|
9
11
|
|
10
12
|
def get_dbos_func_name(f: Any) -> str:
|
11
13
|
if hasattr(f, "dbos_function_name"):
|
12
14
|
return str(getattr(f, "dbos_function_name"))
|
13
|
-
|
14
|
-
|
15
|
-
|
15
|
+
raise DBOSWorkflowFunctionNotFoundError(
|
16
|
+
"<NONE>", f"function {f.__name__} is not registered"
|
17
|
+
)
|
16
18
|
|
17
19
|
|
18
20
|
def set_dbos_func_name(f: Any, name: str) -> None:
|
dbos/_roles.py
CHANGED
@@ -10,6 +10,7 @@ from ._context import DBOSAssumeRole, get_local_dbos_context
|
|
10
10
|
from ._registrations import (
|
11
11
|
DBOSFuncInfo,
|
12
12
|
get_class_info_for_func,
|
13
|
+
get_dbos_func_name,
|
13
14
|
get_or_create_class_info,
|
14
15
|
get_or_create_func_info,
|
15
16
|
)
|
@@ -36,7 +37,7 @@ def check_required_roles(
|
|
36
37
|
ctx = get_local_dbos_context()
|
37
38
|
if ctx is None or ctx.authenticated_roles is None:
|
38
39
|
raise DBOSNotAuthorizedError(
|
39
|
-
f"Function {func
|
40
|
+
f"Function {get_dbos_func_name(func)} requires a role, but was called in a context without authentication information"
|
40
41
|
)
|
41
42
|
|
42
43
|
for r in required_roles:
|
@@ -44,7 +45,7 @@ def check_required_roles(
|
|
44
45
|
return r
|
45
46
|
|
46
47
|
raise DBOSNotAuthorizedError(
|
47
|
-
f"Function {func
|
48
|
+
f"Function {get_dbos_func_name(func)} has required roles, but user is not authenticated for any of them"
|
48
49
|
)
|
49
50
|
|
50
51
|
|
dbos/_scheduler.py
CHANGED
@@ -11,6 +11,7 @@ if TYPE_CHECKING:
|
|
11
11
|
|
12
12
|
from ._context import SetWorkflowID
|
13
13
|
from ._croniter import croniter # type: ignore
|
14
|
+
from ._registrations import get_dbos_func_name
|
14
15
|
|
15
16
|
ScheduledWorkflow = Callable[[datetime, datetime], None]
|
16
17
|
|
@@ -24,20 +25,22 @@ def scheduler_loop(
|
|
24
25
|
iter = croniter(cron, datetime.now(timezone.utc), second_at_beginning=True)
|
25
26
|
except Exception as e:
|
26
27
|
dbos_logger.error(
|
27
|
-
f'Cannot run scheduled function {func
|
28
|
+
f'Cannot run scheduled function {get_dbos_func_name(func)}. Invalid crontab "{cron}"'
|
28
29
|
)
|
29
30
|
while not stop_event.is_set():
|
30
31
|
nextExecTime = iter.get_next(datetime)
|
31
32
|
sleepTime = nextExecTime - datetime.now(timezone.utc)
|
32
33
|
if stop_event.wait(timeout=sleepTime.total_seconds()):
|
33
34
|
return
|
34
|
-
|
35
|
-
|
35
|
+
try:
|
36
|
+
with SetWorkflowID(
|
37
|
+
f"sched-{get_dbos_func_name(func)}-{nextExecTime.isoformat()}"
|
38
|
+
):
|
36
39
|
scheduler_queue.enqueue(func, nextExecTime, datetime.now(timezone.utc))
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
40
|
+
except Exception:
|
41
|
+
dbos_logger.warning(
|
42
|
+
f"Exception encountered in scheduler thread: {traceback.format_exc()})"
|
43
|
+
)
|
41
44
|
|
42
45
|
|
43
46
|
def scheduled(
|
@@ -48,7 +51,7 @@ def scheduled(
|
|
48
51
|
croniter(cron, datetime.now(timezone.utc), second_at_beginning=True)
|
49
52
|
except Exception as e:
|
50
53
|
raise ValueError(
|
51
|
-
f'Invalid crontab "{cron}" for scheduled function function {func
|
54
|
+
f'Invalid crontab "{cron}" for scheduled function function {get_dbos_func_name(func)}.'
|
52
55
|
)
|
53
56
|
|
54
57
|
global scheduler_queue
|
@@ -1,7 +1,7 @@
|
|
1
|
-
dbos-1.6.
|
2
|
-
dbos-1.6.
|
3
|
-
dbos-1.6.
|
4
|
-
dbos-1.6.
|
1
|
+
dbos-1.6.0a5.dist-info/METADATA,sha256=IVcP3LMYY56MWqRLSEYfDNyOyZC2Jn2N75esPSn_Ksc,13267
|
2
|
+
dbos-1.6.0a5.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
dbos-1.6.0a5.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
|
4
|
+
dbos-1.6.0a5.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
5
5
|
dbos/__init__.py,sha256=NssPCubaBxdiKarOWa-wViz1hdJSkmBGcpLX_gQ4NeA,891
|
6
6
|
dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
|
7
7
|
dbos/_admin_server.py,sha256=l46ZX4NpvBP9W8cl9gE7OqMNwUCevLMt2VztM7crBv0,15465
|
@@ -10,10 +10,10 @@ dbos/_classproperty.py,sha256=f0X-_BySzn3yFDRKB2JpCbLYQ9tLwt1XftfshvY7CBs,626
|
|
10
10
|
dbos/_client.py,sha256=DeiJHo5fTedWsipr7qlQQIcDmVAPjzzX94X01121oQM,14780
|
11
11
|
dbos/_conductor/conductor.py,sha256=y_T-8kEHwKWt6W8LtcFMctB_6EvYFWsuGLxiFuuKKBU,23702
|
12
12
|
dbos/_conductor/protocol.py,sha256=DOTprPSd7oHDcvwWSyZpnlPds_JfILtcKzHZa-qBsF4,7330
|
13
|
-
dbos/_context.py,sha256=
|
14
|
-
dbos/_core.py,sha256=
|
13
|
+
dbos/_context.py,sha256=zhje6jObpBcRALYfHyyIEumHtk_enl_PxLl01j4oDME,24897
|
14
|
+
dbos/_core.py,sha256=m3e1WZ_210p2DT8c1sTh4S_CVM748UjkBdiGO846mVg,49269
|
15
15
|
dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
|
16
|
-
dbos/_dbos.py,sha256=
|
16
|
+
dbos/_dbos.py,sha256=qzXD55bGJJW2SxI6HESykDRIpBmODNwIUt_jRkcRBVw,47588
|
17
17
|
dbos/_dbos_config.py,sha256=JUG4V1rrP0p1AYESgih4ea80qOH_13UsgoIIm8X84pw,20562
|
18
18
|
dbos/_debug.py,sha256=99j2SChWmCPAlZoDmjsJGe77tpU2LEa8E2TtLAnnh7o,1831
|
19
19
|
dbos/_docker_pg_helper.py,sha256=tLJXWqZ4S-ExcaPnxg_i6cVxL6ZxrYlZjaGsklY-s2I,6115
|
@@ -21,7 +21,7 @@ dbos/_error.py,sha256=nS7KuXJHhuNXZRErxdEUGT38Hb0VPyxNwSyADiVpHcE,8581
|
|
21
21
|
dbos/_event_loop.py,sha256=cvaFN9-II3MsHEOq8QoICc_8qSKrjikMlLfuhC3Y8Dk,2923
|
22
22
|
dbos/_fastapi.py,sha256=T7YlVY77ASqyTqq0aAPclZ9YzlXdGTT0lEYSwSgt1EE,3151
|
23
23
|
dbos/_flask.py,sha256=Npnakt-a3W5OykONFRkDRnumaDhTQmA0NPdUCGRYKXE,1652
|
24
|
-
dbos/_kafka.py,sha256=
|
24
|
+
dbos/_kafka.py,sha256=Gm4fHWl7gYb-i5BMvwNwm5Km3z8zQpseqdMgqgFjlGI,4252
|
25
25
|
dbos/_kafka_message.py,sha256=NYvOXNG3Qn7bghn1pv3fg4Pbs86ILZGcK4IB-MLUNu0,409
|
26
26
|
dbos/_logger.py,sha256=Dp6bHZKUtcm5gWwYHj_HA5Wj5OMuJGUrpl2g2i4xDZg,4620
|
27
27
|
dbos/_migrations/env.py,sha256=38SIGVbmn_VV2x2u1aHLcPOoWgZ84eCymf3g_NljmbU,1626
|
@@ -42,9 +42,9 @@ dbos/_migrations/versions/f4b9b32ba814_functionname_childid_op_outputs.py,sha256
|
|
42
42
|
dbos/_outcome.py,sha256=Kz3aL7517q9UEFTx3Cq9zzztjWyWVOx_08fZyHo9dvg,7035
|
43
43
|
dbos/_queue.py,sha256=Kq7aldTDLRF7cZtkXmsCy6wV2PR24enkhghEG25NtaU,4080
|
44
44
|
dbos/_recovery.py,sha256=TBNjkmSEqBU-g5YXExsLJ9XoCe4iekqtREsskXZECEg,2507
|
45
|
-
dbos/_registrations.py,sha256=
|
46
|
-
dbos/_roles.py,sha256=
|
47
|
-
dbos/_scheduler.py,sha256=
|
45
|
+
dbos/_registrations.py,sha256=U-PwDZBuyuJjA2LYtud7D3VxDR440mVpMYE-S11BWDo,7369
|
46
|
+
dbos/_roles.py,sha256=kCuhhg8XLtrHCgKgm44I0abIRTGHltf88OwjEKAUggk,2317
|
47
|
+
dbos/_scheduler.py,sha256=CWeGVfl9h51VXfxt80y5Da_5pE8SPty_AYkfpJkkMxQ,2117
|
48
48
|
dbos/_schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
49
49
|
dbos/_schemas/application_database.py,sha256=SypAS9l9EsaBHFn9FR8jmnqt01M74d9AF1AMa4m2hhI,1040
|
50
50
|
dbos/_schemas/system_database.py,sha256=rbFKggONdvvbb45InvGz0TM6a7c-Ux9dcaL-h_7Z7pU,4438
|
@@ -69,4 +69,4 @@ dbos/cli/cli.py,sha256=IcfaX4rrSrk6f24S2jrlR33snYMyNyEIx_lNQtuVr2E,22081
|
|
69
69
|
dbos/dbos-config.schema.json,sha256=CjaspeYmOkx6Ip_pcxtmfXJTn_YGdSx_0pcPBF7KZmo,6060
|
70
70
|
dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
|
71
71
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
72
|
-
dbos-1.6.
|
72
|
+
dbos-1.6.0a5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|