Skip to content

Commit

Permalink
Merge pull request #195 from the-virtual-brain/TVB-2750
Browse files Browse the repository at this point in the history
TVB-2750. Adjust rest client code to server changes.
  • Loading branch information
popaula937 authored Jul 15, 2020
2 parents 60565e0 + 9de23ca commit 21a1088
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
from tvb.adapters.analyzers.fourier_adapter import FFTAdapterModel, FourierAdapter
from tvb.adapters.datatypes.db.connectivity import ConnectivityIndex
from tvb.adapters.datatypes.h5.time_series_h5 import TimeSeriesH5
from tvb.adapters.simulator.simulator_adapter import SimulatorAdapterModel
from tvb.basic.logger.builder import get_logger
from tvb.core.entities.file.simulator.view_model import SimulatorAdapterModel
from tvb.interfaces.rest.client.examples.utils import monitor_operation, compute_rest_url
from tvb.interfaces.rest.client.tvb_client import TVBClient

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,8 @@ def get_operations_results(self, operation_gid):

@handle_response
def launch_operation(self, project_gid, algorithm_class, view_model, temp_folder):
h5_file_path = h5.path_for(temp_folder, ViewModelH5, view_model.gid)

h5_file = ViewModelH5(h5_file_path, view_model)
h5_file.store(view_model)
h5_file.close()
h5_file_path = h5.path_for(temp_folder, ViewModelH5, view_model.gid, type(view_model).__name__)
h5.store_view_model(view_model, temp_folder)

model_file_obj = open(h5_file_path, 'rb')
files = {RequestFileKey.LAUNCH_ANALYZERS_MODEL_FILE.value: (os.path.basename(h5_file_path), model_file_obj)}
Expand Down

0 comments on commit 21a1088

Please sign in to comment.