Exemplo n.º 1
0
 def setThreadable(self, threadable):
     """Set enableMemoryOptimizer to the value.
     @type threadable: bool
     @param threadable: boolean to enable/disable threadable"""
     return self.stub.SetThreadable(job_pb2.LayerSetThreadableRequest(
         layer=self.data, threadable=threadable),
                                    timeout=Cuebot.Timeout)
Exemplo n.º 2
0
    def setThreadable(self, threadable):
        """Sets the threadable field.

        :type  threadable: bool
        :param threadable: boolean to enable/disable threadable
        """
        return self.stub.SetThreadable(job_pb2.LayerSetThreadableRequest(
            layer=self.data, threadable=threadable),
                                       timeout=Cuebot.Timeout)
Exemplo n.º 3
0
    def testSetThreadable(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.SetThreadable.return_value = job_pb2.LayerSetThreadableResponse()
        getStubMock.return_value = stubMock

        value = True
        layer = opencue.wrappers.layer.Layer(
            job_pb2.Layer(name=TEST_LAYER_NAME))
        layer.setThreadable(value)

        stubMock.SetThreadable.assert_called_with(
            job_pb2.LayerSetThreadableRequest(layer=layer.data, threadable=value),
            timeout=mock.ANY)