Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.tools.actions.data_manager

import logging

from galaxy.model.base import transaction
from . import DefaultToolAction

log = logging.getLogger(__name__)


[docs]class DataManagerToolAction(DefaultToolAction): """Tool action used for Data Manager Tools"""
[docs] def execute(self, tool, trans, **kwds): rval = super().execute(tool, trans, **kwds) if isinstance(rval, tuple) and len(rval) >= 2 and isinstance(rval[0], trans.app.model.Job): assoc = trans.app.model.DataManagerJobAssociation(job=rval[0], data_manager_id=tool.data_manager_id) trans.sa_session.add(assoc) with transaction(trans.sa_session): trans.sa_session.commit() else: log.error(f"Got bad return value from DefaultToolAction.execute(): {rval}") return rval