コード例 #1
0
ファイル: job.py プロジェクト: xinobi/OpenCue
 def setMaxRetries(self, maxRetries):
     """Sets the number of retries before a frame goes dead
     @type  maxRetries: int
     @param maxRetries: New max retries"""
     self.stub.SetMaxRetries(job_pb2.JobSetMaxRetriesRequest(
         job=self.data, max_retries=maxRetries),
                             timeout=Cuebot.Timeout)
コード例 #2
0
    def testSetMaxRetries(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.SetMaxRetries.return_value = job_pb2.JobSetMaxRetriesResponse()
        getStubMock.return_value = stubMock

        retries = 10
        job = opencue.wrappers.job.Job(
            job_pb2.Job(name=TEST_JOB_NAME))
        job.setMaxRetries(retries)

        stubMock.SetMaxRetries.assert_called_with(
            job_pb2.JobSetMaxRetriesRequest(job=job.data, max_retries=retries), timeout=mock.ANY)