Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Fix #549: remove name generator for jobs #684

Merged
merged 1 commit into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions atmo/jobs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
from django.utils.safestring import mark_safe
from django.utils.text import get_valid_filename

from .. import names
from ..clusters.models import EMRRelease
from ..decorators import (change_permission_required,
delete_permission_required, modified_date,
view_permission_required)
from ..models import next_field_value
from .forms import EditSparkJobForm, NewSparkJobForm, SparkJobAvailableForm
from .models import SparkJob

Expand Down Expand Up @@ -48,10 +46,8 @@ def new_spark_job(request):
"""
View to schedule a new Spark job to run on AWS EMR.
"""
identifier = names.random_scientist()
next_identifier = next_field_value(SparkJob, 'identifier', identifier)
initial = {
'identifier': next_identifier,
'identifier': '',
'size': 1,
'interval_in_hours': SparkJob.INTERVAL_WEEKLY,
'job_timeout': 24,
Expand Down
4 changes: 4 additions & 0 deletions tests/jobs/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ def test_new_spark_job(client):
response = client.get(reverse('jobs-new'))
assert response.status_code == 200
assert 'form' in response.context
f = response.context['form']
assert f.initial['identifier'] == ''
assert f.initial['size'] == 1
assert f.initial['job_timeout'] == 24


@pytest.mark.usefixtures('transactional_db')
Expand Down