Set process id before secret parameter injection
authorLisa Velden <velden@google.com>
Fri, 26 Jun 2015 07:48:48 +0000 (09:48 +0200)
committerLisa Velden <velden@google.com>
Mon, 29 Jun 2015 14:50:12 +0000 (16:50 +0200)
Signed-off-by: Lisa Velden <velden@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

lib/jqueue/exec.py

index 50b7ac6..8da1d12 100644 (file)
@@ -134,13 +134,13 @@ def main():
 
     job = context.jobqueue.SafeLoadJobFromDisk(job_id, False)
 
+    job.SetPid(os.getpid())
+
     if secret_params:
       for i in range(0, len(secret_params)):
         if hasattr(job.ops[i].input, "osparams_secret") and secret_params[i]:
           job.ops[i].input.osparams_secret = secret_params[i]
 
-    job.SetPid(os.getpid())
-
     execfun = mcpu.Processor(context, job_id, job_id).ExecOpCode
     proc = _JobProcessor(context.jobqueue, execfun, job)
     result = _JobProcessor.DEFER