(self, job)
| 59 | self.lock = lock |
| 60 | |
| 61 | def queryAsynJob(self, job): |
| 62 | if job.jobId is None: |
| 63 | return job |
| 64 | |
| 65 | try: |
| 66 | self.lock.acquire() |
| 67 | result = self.connection.poll(job.jobId, job.responsecls).jobresult |
| 68 | except cloudstackException.CloudstackAPIException as e: |
| 69 | result = str(e) |
| 70 | finally: |
| 71 | self.lock.release() |
| 72 | |
| 73 | job.result = result |
| 74 | return job |
| 75 | |
| 76 | def executeCmd(self, job): |
| 77 | cmd = job.cmd |