Add a space to an error message. Fixes AC-1156.

This commit is contained in:
Luke Sneeringer
2014-06-12 08:16:04 -05:00
parent fc2821fb09
commit 25abbc1c16
2 changed files with 4 additions and 2 deletions

View File

@@ -242,7 +242,9 @@ def process_graph(graph, task_capacity):
start_status = node_obj.start(error_callback=error_handler)
if not start_status:
node_obj.status = 'failed'
node_obj.job_explanation += "Task failed pre-start check"
if node_obj.job_explanation:
node_obj.job_explanation += ' '
node_obj.job_explanation += 'Task failed pre-start check.'
node_obj.save()
# TODO: Run error handler
continue

View File

@@ -572,7 +572,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
opts = dict([(field, start_args.get(field, '')) for field in needed])
if not all(opts.values()):
missing_fields = ', '.join([k for k,v in opts.items() if not v])
self.job_explanation = u'Missing needed fields: %s' % missing_fields
self.job_explanation = u'Missing needed fields: %s.' % missing_fields
self.save(update_fields=['job_explanation'])
return False
task_class().apply_async((self.pk,), opts, link_error=error_callback)