Commit 846f6b02 authored by Vermaat's avatar Vermaat
Browse files

Store interface when submitting batch job without email

parent 999608e0
......@@ -98,9 +98,9 @@ class Scheduler() :
if settings.TESTING:
return
# Mail is set to '<IP ADDRESS>@webservice' if the batch job was
# submitted using the webservice without specifying an email address.
if mailTo.endswith('@webservice'):
# Mail is set to '<IP ADDRESS>@<INTERFACE>.mutalyzer' if the batch job
# was submitted without specifying an email address.
if mailTo.endswith('.mutalyzer'):
return
#TODO: Handle Connection errors in a try, except clause
......
......@@ -155,7 +155,7 @@ class MutalyzerService(ServiceBase):
address = unicode(ctx.transport.req_env['REMOTE_ADDR'])
except (AttributeError, KeyError):
address = 'localhost'
email = '%s@webservice' % address
email = '%s@webservice.mutalyzer' % address
result_id = scheduler.addJob(email, job, columns,
batch_types[process], argument)
......
......@@ -907,7 +907,7 @@ def batch_jobs_submit():
errors = []
if not email:
email = '{}@webservice'.format(request.remote_addr)
email = '{}@website.mutalyzer'.format(request.remote_addr)
if job_type not in BATCH_JOB_TYPES:
errors.append('Invalid batch job type.')
......
Supports Markdown
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