[connectors] Remove old reference to is_k8s cluster in create session
@@ -27,7 +27,7 @@ from django.utils.translation import ugettext as _
from django.views.decorators.http import require_GET, require_POST
from desktop.api2 import __paginate
-from desktop.conf import IS_K8S_ONLY, TASK_SERVER
+from desktop.conf import TASK_SERVER
from desktop.lib.i18n import smart_str
from desktop.lib.django_util import JsonResponse
from desktop.models import Document2, Document
@@ -81,17 +81,6 @@ def create_session(request):
notebook = json.loads(request.POST.get('notebook', '{}'))
session = json.loads(request.POST.get('session', '{}'))
- if IS_K8S_ONLY.get(): # TODO: create session happening asynchronously on cluster selection when opening Notebook
- return JsonResponse({
- "status": 0,
- "session": {
- "reuse_session": True, "type": session['type'],
- "properties": [
- {"nice_name": "Settings", "multiple": True, "key": "settings", "help_text": "Hive and Hadoop configuration properties.", "defaultValue": [], "type": "settings", "options": ["hive.map.aggr", "hive.exec.compress.output", "hive.exec.parallel", "hive.execution.engine", "mapreduce.job.queuename"], "value": []}
- ]
- }
- })
-
properties = session.get('properties', [])
response['session'] = get_api(request, session).create_session(lang=session['type'], properties=properties)
