Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(workers): remove the simulator worker #2184

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading