diff --git a/reana_server/api_client.py b/reana_server/api_client.py deleted file mode 100644 index e3c4c316..00000000 --- a/reana_server/api_client.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# -# This file is part of REANA. -# Copyright (C) 2017, 2018 CERN. -# -# REANA is free software; you can redistribute it and/or modify it -# under the terms of the MIT License; see LICENSE file for more details. - -"""REST API client generator.""" - -import json -import os - -import pkg_resources -from flask import current_app -from reana_commons.api_client import BaseAPIClient -from werkzeug.local import LocalProxy - - -def _get_current_rwc_api_client(): - """Return current state of the search extension.""" - rwc_api_client = BaseAPIClient('reana-workflow-controller') - return rwc_api_client._client - - -current_rwc_api_client = LocalProxy(_get_current_rwc_api_client) diff --git a/reana_server/rest/workflows.py b/reana_server/rest/workflows.py index 41af4d01..b698fa82 100644 --- a/reana_server/rest/workflows.py +++ b/reana_server/rest/workflows.py @@ -12,13 +12,12 @@ import traceback from bravado.exception import HTTPError +from flask import Blueprint from flask import current_app as app -from flask import Blueprint, jsonify, request, send_file - +from flask import jsonify, request, send_file +from reana_commons.api_client import current_rwc_api_client from reana_server.utils import get_user_from_token, is_uuid_v4 -from ..api_client import current_rwc_api_client - blueprint = Blueprint('workflows', __name__)