@@ -140,23 +140,18 @@ def start_workflow(
140140 self ,
141141 wfid : Optional [str ],
142142 attributes : TracedAttributes ,
143- is_temp_workflow : bool = False ,
144143 ) -> None :
145144 if wfid is None or len (wfid ) == 0 :
146145 wfid = self .assign_workflow_id ()
147146 self .id_assigned_for_next_workflow = ""
148147 self .workflow_id = wfid
149148 self .function_id = 0
150- if not is_temp_workflow :
151- self ._start_span (attributes )
149+ self ._start_span (attributes )
152150
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 :
156152 self .workflow_id = ""
157153 self .function_id = - 1
158- if not is_temp_workflow :
159- self ._end_span (exc_value )
154+ self ._end_span (exc_value )
160155
161156 def is_within_workflow (self ) -> bool :
162157 return len (self .workflow_id ) > 0
@@ -490,7 +485,6 @@ class EnterDBOSWorkflow(AbstractContextManager[DBOSContext, Literal[False]]):
490485 def __init__ (self , attributes : TracedAttributes ) -> None :
491486 self .created_ctx = False
492487 self .attributes = attributes
493- self .is_temp_workflow = attributes ["name" ] == "temp_wf"
494488 self .saved_workflow_timeout : Optional [int ] = None
495489 self .saved_deduplication_id : Optional [str ] = None
496490 self .saved_priority : Optional [int ] = None
@@ -514,7 +508,7 @@ def __enter__(self) -> DBOSContext:
514508 self .saved_priority = ctx .priority
515509 ctx .priority = None
516510 ctx .start_workflow (
517- None , self .attributes , self . is_temp_workflow
511+ None , self .attributes
518512 ) # Will get from the context's next workflow ID
519513 return ctx
520514
@@ -526,7 +520,7 @@ def __exit__(
526520 ) -> Literal [False ]:
527521 ctx = assert_current_dbos_context ()
528522 assert ctx .is_within_workflow ()
529- ctx .end_workflow (exc_value , self . is_temp_workflow )
523+ ctx .end_workflow (exc_value )
530524 # Restore the saved workflow timeout
531525 ctx .workflow_timeout_ms = self .saved_workflow_timeout
532526 # Clear any propagating timeout
0 commit comments