Skip to content

Commit d3d9bda

Browse files
committed
Refactor: remove Listener, ServerComponent, and related unused code, update IBPMNServer.listener type, and clean up bpmn_server initialization logic
1 parent 35449f8 commit d3d9bda

File tree

4 files changed

+3
-112
lines changed

4 files changed

+3
-112
lines changed

pybpmn_server/server/bpmn_server.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ def __init__(self, configuration: Optional[Settings] = None):
2727
self.model_data_store = self.configuration.model_data_store
2828
self.app_delegate = DefaultAppDelegate(self.listener, self.data_store)
2929
self.script_handler = self.configuration.script_handler
30-
# TODO (pybpmn-server-h00): Refactor app delegate startup calling
31-
# self.app_delegate.start_up(self.configuration)
3230

3331
def status(self) -> Dict[str, Any]:
3432
"""Get the status of the server."""

pybpmn_server/server/interfaces.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
from typing import TYPE_CHECKING, Any, Optional, Protocol
1717

1818
if TYPE_CHECKING:
19+
from pymitter import EventEmitter
20+
1921
from pybpmn_server.common.configuration import Settings
2022
from pybpmn_server.datastore.interfaces import IDataStore, IModelsDatastore
2123
from pybpmn_server.engine.interfaces import IEngine, IExecution, ScriptHandler
@@ -26,7 +28,7 @@ class IBPMNServer(Protocol):
2628
"""Represents the core BPMN server and its dependencies."""
2729

2830
engine: IEngine
29-
listener: Any # EventEmitter
31+
listener: EventEmitter
3032
configuration: Settings
3133
definitions: IModelsDatastore
3234
app_delegate: AppDelegateBase
@@ -36,20 +38,6 @@ class IBPMNServer(Protocol):
3638
script_handler: ScriptHandler
3739

3840

39-
class IServerComponent(Protocol):
40-
"""Represents a component of the BPMN server."""
41-
42-
server: IBPMNServer
43-
configuration: Settings
44-
cron: Any
45-
cache: Any
46-
app_delegate: AppDelegateBase
47-
engine: Any
48-
data_store: IDataStore
49-
script_handler: ScriptHandler
50-
definitions: Any
51-
52-
5341
class ICron(Protocol):
5442
"""Manages scheduling and timer events for the server."""
5543

pybpmn_server/server/listener.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

pybpmn_server/server/server_component.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)