Skip to content

Commit

Permalink
refactor(workers): remove the simulator worker
Browse files Browse the repository at this point in the history
  • Loading branch information
mabw-rte committed Oct 11, 2024
1 parent 4374350 commit cc1ba58
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 240 deletions.
12 changes: 0 additions & 12 deletions antarest/service_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
from antarest.study.storage.rawstudy.watcher import Watcher
from antarest.study.web.watcher_blueprint import create_watcher_routes
from antarest.worker.archive_worker import ArchiveWorker
from antarest.worker.simulator_worker import SimulatorWorker
from antarest.worker.worker import AbstractWorker

logger = logging.getLogger(__name__)
Expand All @@ -72,7 +71,6 @@ class Module(str, Enum):
MATRIX_GC = "matrix_gc"
ARCHIVE_WORKER = "archive_worker"
AUTO_ARCHIVER = "auto_archiver"
SIMULATOR_WORKER = "simulator_worker"


def init_db_engine(
Expand Down Expand Up @@ -221,16 +219,6 @@ def create_archive_worker(
return ArchiveWorker(event_bus, workspace, local_root, config)


def create_simulator_worker(
config: Config,
matrix_service: MatrixService,
event_bus: t.Optional[IEventBus] = None,
) -> AbstractWorker:
if not event_bus:
event_bus, _ = create_event_bus(None, config)
return SimulatorWorker(event_bus, matrix_service, config)


def create_services(
config: Config, app_ctxt: t.Optional[AppBuildContext], create_all: bool = False
) -> t.Dict[str, t.Any]:
Expand Down
5 changes: 0 additions & 5 deletions antarest/singleton_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
create_archive_worker,
create_core_services,
create_matrix_gc,
create_simulator_worker,
create_watcher,
init_db_engine,
)
Expand Down Expand Up @@ -72,10 +71,6 @@ def _init(config_file: Path, services_list: List[Module]) -> Dict[Module, IServi
worker = create_archive_worker(config, "test", event_bus=event_bus)
services[Module.ARCHIVE_WORKER] = worker

if Module.SIMULATOR_WORKER in services_list:
worker = create_simulator_worker(config, matrix_service=matrix_service, event_bus=event_bus)
services[Module.SIMULATOR_WORKER] = worker

if Module.AUTO_ARCHIVER in services_list:
auto_archive_service = AutoArchiveService(study_service, config)
services[Module.AUTO_ARCHIVER] = auto_archive_service
Expand Down
143 changes: 0 additions & 143 deletions antarest/worker/simulator_worker.py

This file was deleted.

80 changes: 0 additions & 80 deletions tests/worker/test_simulator_worker.py

This file was deleted.

0 comments on commit cc1ba58

Please sign in to comment.