File tree Expand file tree Collapse file tree 7 files changed +36
-36
lines changed Expand file tree Collapse file tree 7 files changed +36
-36
lines changed Original file line number Diff line number Diff line change 99
1010
1111__all__ = [
12- "with_attributes" ,
13- "Activity" ,
1412 "PRIORITY_NOT_SET" ,
13+ "Activity" ,
14+ "with_attributes" ,
1515]
1616
1717
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def _cleanup_worker_processes(self):
112112 name , status = child .name (), child .status ()
113113 except psutil .NoSuchProcess : # May be untimely deceased
114114 name , status = "unknown" , "unknown"
115- logger .debug (" child: name=%s pid=%d status=%s" % ( name , child .pid , status ) )
115+ logger .debug (f " child: name={ name } pid={ child .pid :d } status= { status } " )
116116 if status in (psutil .STATUS_ZOMBIE , "unknown" ):
117117 logger .debug (f" process { child .pid } is zombie, will cleanup" )
118118 # join process to clean it up
Original file line number Diff line number Diff line change 2222
2323
2424__all__ = [
25+ "list_workflow_executions" ,
2526 "show_workflow_profile" ,
2627 "show_workflow_status" ,
27- "list_workflow_executions" ,
2828 "swf_identity" ,
2929]
3030
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def convert_timestamp(dt: int | datetime | None) -> datetime | None:
3737class ConnectedSWFObject :
3838 """Authenticated object interface"""
3939
40- __slots__ = ["region " , "connection" , "boto3_client " ]
40+ __slots__ = ["boto3_client " , "connection" , "region " ]
4141
4242 region : str
4343 boto3_client : boto3 .client
Original file line number Diff line number Diff line change @@ -58,18 +58,18 @@ class ActivityType(BaseModel):
5858 kind = "type"
5959
6060 __slots__ = [
61+ "creation_date" ,
62+ "deprecation_date" ,
63+ "description" ,
6164 "domain" ,
6265 "name" ,
63- "version" ,
6466 "status" ,
65- "description" ,
66- "creation_date" ,
67- "deprecation_date" ,
68- "task_list" ,
6967 "task_heartbeat_timeout" ,
68+ "task_list" ,
7069 "task_schedule_to_close_timeout" ,
7170 "task_schedule_to_start_timeout" ,
7271 "task_start_to_close_timeout" ,
72+ "version" ,
7373 ]
7474
7575 def __init__ (
@@ -225,14 +225,14 @@ def __repr__(self):
225225@immutable
226226class ActivityTask (BaseModel ):
227227 __slots__ = [
228+ "activity_id" ,
229+ "activity_type" ,
228230 "domain" ,
231+ "input" ,
232+ "started_event_id" ,
229233 "task_list" ,
230234 "task_token" ,
231- "activity_type" ,
232235 "workflow_execution" ,
233- "input" ,
234- "activity_id" ,
235- "started_event_id" ,
236236 ]
237237
238238 # noinspection PyMissingConstructor
Original file line number Diff line number Diff line change @@ -40,10 +40,10 @@ class Domain(BaseModel):
4040 """
4141
4242 __slots__ = [
43- "name" ,
44- "status" ,
4543 "description" ,
44+ "name" ,
4645 "retention_period" ,
46+ "status" ,
4747 ]
4848
4949 def __init__ (
Original file line number Diff line number Diff line change @@ -65,17 +65,17 @@ class WorkflowType(BaseModel):
6565 """
6666
6767 __slots__ = [
68+ "child_policy" ,
69+ "creation_date" ,
70+ "decision_tasks_timeout" ,
71+ "deprecation_date" ,
72+ "description" ,
6873 "domain" ,
74+ "execution_timeout" ,
6975 "name" ,
70- "version" ,
7176 "status" ,
72- "creation_date" ,
73- "deprecation_date" ,
7477 "task_list" ,
75- "child_policy" ,
76- "execution_timeout" ,
77- "decision_tasks_timeout" ,
78- "description" ,
78+ "version" ,
7979 ]
8080
8181 def __init__ (
@@ -251,7 +251,7 @@ def start_execution(
251251 :param decision_tasks_timeout: maximum duration of decision tasks
252252 for this workflow execution
253253 """
254- workflow_id = workflow_id or "%s-%s-%i" % ( self .name , self .version , time .time ())
254+ workflow_id = workflow_id or f" { self .name } - { self .version } - { time .time ():d } "
255255 task_list = task_list or self .task_list
256256 child_policy = child_policy or self .child_policy
257257 if child_policy not in CHILD_POLICIES :
@@ -317,25 +317,25 @@ class WorkflowExecution(BaseModel):
317317 kind = "execution"
318318
319319 __slots__ = [
320- "domain" ,
321- "workflow_id" ,
322- "run_id" ,
323- "status" ,
324- "workflow_type" ,
325- "task_list" ,
320+ "cancel_requested" ,
326321 "child_policy" ,
327322 "close_status" ,
323+ "close_timestamp" ,
324+ "decision_tasks_timeout" ,
325+ "domain" ,
328326 "execution_timeout" ,
329327 "input" ,
330- "tag_list" ,
331- "decision_tasks_timeout" ,
332- "close_timestamp" ,
333- "start_timestamp" ,
334- "cancel_requested" ,
335- "latest_execution_context" ,
336328 "latest_activity_task_timestamp" ,
329+ "latest_execution_context" ,
337330 "open_counts" ,
338331 "parent" ,
332+ "run_id" ,
333+ "start_timestamp" ,
334+ "status" ,
335+ "tag_list" ,
336+ "task_list" ,
337+ "workflow_id" ,
338+ "workflow_type" ,
339339 ]
340340
341341 def __init__ (
You can’t perform that action at this time.
0 commit comments