Make sure we check arguments passed to signal start before allowing it

to proceed.
This commit is contained in:
Matthew Jones
2014-03-13 14:43:47 -04:00
parent 20285e18e5
commit e6209d4d4f
4 changed files with 21 additions and 1 deletions

View File

@@ -385,6 +385,13 @@ class Job(CommonTask):
return dependencies
def signal_start(self, **kwargs):
if not self.can_start:
return False
needed = self._get_passwords_needed_to_start()
opts = dict([(field, kwargs.get(field, '')) for field in needed])
if not all(opts.values()):
return False
json_args = json.dumps(kwargs)
self.start_args = json_args
self.save()