Skip to content

Commit

Permalink
fix: keep list of ServiceAPIs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan1248 committed Jan 24, 2025
1 parent 8c71a95 commit 46ae8bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion pfdl_scheduler/model/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from pfdl_scheduler.model.array import Array


@dataclass
class Service:
"""Represents a Service or Service Call in the PFDL.
Expand Down
2 changes: 2 additions & 0 deletions pfdl_scheduler/petri_net/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def __init__(
self.tree = None
self.file_name = file_name
self.pfdl_base_classes = pfdl_base_classes
self.service_apis: list[ServiceAPI] = []

def add_callback(self, transition_uuid: str, callback_function: Callable, *args: Any) -> None:
"""Registers the given callback function in the transition_dict.
Expand Down Expand Up @@ -288,6 +289,7 @@ def generate_service(
service_api = self.pfdl_base_classes.get_class("ServiceAPI")(
service, task_context, in_loop=in_loop
)
self.service_apis.append(service_api)

service_started_uuid = create_place(service.name + " started", self.net, service_node)
service_finished_uuid = create_place(service.name + " finished", self.net, service_node)
Expand Down

0 comments on commit 46ae8bd

Please sign in to comment.