Commit 3be0c73d authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added fields according to UWS specification.

parent 1723a13a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ class JobCache(object):

    def set(self, jobObj):
        data = { "jobId": jobObj.jobId,
                 "jobType": jobObj.type,
                 "ownerId": jobObj.ownerId,
                 "phase": jobObj.phase,
                 "quote": jobObj.quote,
                 "startTime": jobObj.startTime,
@@ -23,6 +25,7 @@ class JobCache(object):
                 "executionDuration": jobObj.executionDuration,
                 "destruction": jobObj.destruction,
                 "parameters": jobObj.parameters,
                 "results": jobObj.results,
                 "jobInfo": jobObj.jobInfo }
        self.redisCli.set(jobObj.jobId, json.dumps(data))

+3 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ class JobQueue(object):
    # Pushes a new job into the queue
    def insertJob(self, jobObj):
        data = { "jobId": jobObj.jobId,
                 "jobType": jobObj.type,
                 "ownerId": jobObj.ownerId,
                 "phase": jobObj.phase,
                 "quote": jobObj.quote,
                 "startTime": jobObj.startTime,
@@ -42,6 +44,7 @@ class JobQueue(object):
                 "executionDuration": jobObj.executionDuration,
                 "destruction": jobObj.destruction,
                 "parameters": jobObj.parameters,
                 "results": jobObj.results,
                 "jobInfo": jobObj.jobInfo }
        self.redisCli.lpush(self.queueName, json.dumps(data))