Skip to content

Commit

Permalink
No More Class Copies
Browse files Browse the repository at this point in the history
  • Loading branch information
AvocadoMoon committed Aug 28, 2024
1 parent 1c88e93 commit 5e9efab
Show file tree
Hide file tree
Showing 7 changed files with 717 additions and 1,539 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import jakarta.enterprise.context.ApplicationScoped;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import cbit.vcell.message.server.dispatcher.SimulationDispatcherEngineCopy;
import cbit.vcell.message.server.dispatcher.SimulationDispatcherEngine;
import org.vcell.restq.Simulations.DTO.SimulationStatus;
import org.vcell.restq.Simulations.DTO.StatusMessage;
import org.vcell.restq.db.AgroalConnectionFactory;
Expand All @@ -31,13 +31,13 @@ public class SimulationRestDB {

private final DatabaseServerImpl databaseServerImpl;
private final SimulationDatabaseDirect simulationDatabaseDirect;
private final SimulationDispatcherEngineCopy simulationDispatcherEngine;
private final SimulationDispatcherEngine simulationDispatcherEngine;
private final BioModelRestDB bioModelRestDB;

public SimulationRestDB(AgroalConnectionFactory agroalConnectionFactory) throws DataAccessException, SQLException {
databaseServerImpl = new DatabaseServerImpl(agroalConnectionFactory, agroalConnectionFactory.getKeyFactory());
simulationDatabaseDirect = new SimulationDatabaseDirect(new AdminDBTopLevel(agroalConnectionFactory), databaseServerImpl, true);
simulationDispatcherEngine = new SimulationDispatcherEngineCopy();
simulationDispatcherEngine = new SimulationDispatcherEngine();
bioModelRestDB = new BioModelRestDB(this, databaseServerImpl);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.vcell.restclient.api.SimulationResourceApi;
import org.vcell.restclient.model.SchedulerStatus;
import org.vcell.restclient.model.Status;
import cbit.vcell.message.server.dispatcher.SimulationDispatcherEngineCopy;
import cbit.vcell.message.server.dispatcher.SimulationDispatcherEngine;
import org.vcell.restq.Simulations.DTO.SimulationStatus;
import org.vcell.restq.Simulations.DTO.StatusMessage;
import org.vcell.restq.TestEndpointUtils;
Expand Down Expand Up @@ -188,7 +188,7 @@ public void testDifferentSimulationStates() throws Exception{
SimulationJob simulationJob = new SimulationJob(simulation, 0, null);
SimulationTask simulationTask = new SimulationTask(simulationJob, 0);
WorkerEvent workerEvent = new WorkerEvent(WorkerEvent.JOB_ACCEPTED, "testService", simulationTask, "testHost", SimulationMessage.MESSAGE_JOB_ACCEPTED);
SimulationDispatcherEngineCopy simulationDispatcherEngine = new SimulationDispatcherEngineCopy();
SimulationDispatcherEngine simulationDispatcherEngine = new SimulationDispatcherEngine();

simulationDispatcherEngine.onWorkerEvent(workerEvent, simulationDatabaseDirect, null);

Expand Down

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit 5e9efab

Please sign in to comment.