Commit fb6f827c authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[databases] Remove load_db_view

The work it did is not relevant anymore
parent f2d288ad
......@@ -285,32 +285,6 @@ def start_db_container(host, db_name, protocol_name, set_name, database, db_set,
#----------------------------------------------------------
def load_db_view(db_name, protocol_name, set_name, database, excluded_outputs=None):
try:
view = database.view(protocol_name, set_name)
view.prepare_outputs()
view.setup()
except Exception:
logger.error("Failed to setup the database set `%s/%s/%s'", db_name, protocol_name,
set_name)
import traceback
for e in traceback.format_exc().split('\n'):
logger.error(' %s', e)
return (None, None)
if excluded_outputs is None:
excluded_outputs = []
# Setup the inputs
input_group = view.input_group(exclude_outputs=excluded_outputs)
return (view, input_group)
#----------------------------------------------------------
def pull(webapi, prefix, names, force, indentation, format_cache):
"""Copies databases (and required dataformats) from the server.
......@@ -389,7 +363,7 @@ def index_outputs(configuration, names, uid=None, db_root=None, docker=False):
for protocol_name, set_name, db_set in sets:
if not docker:
(view, input_group) = load_db_view(db_name, protocol_name, set_name, database)
view = database.view(protocol_name, set_name)
if view is None:
retcode += 1
......@@ -596,8 +570,7 @@ def view_outputs(configuration, dataset_name, excluded_outputs=None, uid=None,
# Setup the view so the outputs can be used
if not docker:
(view, input_group) = load_db_view(db_name, protocol_name, set_name, database,
excluded_outputs=excluded_outputs)
view = database.view(protocol_name, set_name)
if view is None:
return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment