Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/p/y/PyRQ-0.4.1/test/RRQReader/TestQueueBlocking.py   PyRQ(Download)
        namespace = iface.create(maxsize=maxsize)
        iface = PyRQIface(namespace=namespace, quiet=self.quiet, ref="testDelayedPutThenClosed")
        iface.put("hello.world.1", block=True, timeout=None)
        self._closeQueue(namespace, delay=1, name="closer-testDelayedPutThenClosed")
        #    Queue should now be full.
        try:
            iface.put("hello.world.2", block=True, timeout=None)
        namespace = iface.create(maxsize=maxsize)
        iface = PyRQIface(namespace=namespace, quiet=self.quiet, ref="testDelayedWithTimeoutPutThenClosed")
        iface.put("hello.world.1", block=True, timeout=None)
        #    Queue should now be full.
        self._closeQueue(namespace, delay=2, name="closer-testDelayedWithTimeoutPutThenClosed")
        try:
            iface.put("hello.world.2", block=True, timeout=5)
        namespace = iface.create(maxsize=maxsize)
        iface = PyRQIface(namespace=namespace, quiet=self.quiet, ref="testDelayedWithTimeoutPutThenClosed")
        iface.put("hello.world.1", block=True, timeout=None)
        #    Queue should now be full.
        try:

src/p/y/PyRQ-0.4.1/test/RRQReader/TestRRQReader.py   PyRQ(Download)
                    self.logger.debug("PUT %(R)s putting: %(D)s"%{"R":ref, "D":eData})
                    try:
                        iface.put(data=eData, timeout=putTimeout)
                    except Exception, e:
                        self.logger.error("PUT %(R)s ERROR Failed: %(E)s from: %(W)s."%{"R":ref, "E":e, "W":iface.getLastSockDetails()})
        iface = PyRQIface(ref="testPostCloseDifferentIface.0", namespace=self.namespace, quiet=self.quiet, loggingModule=testLoggingModule)
        try:
            iface.put(eData, block=block, timeout=timeout)
        except ClosedError, _e:
            assert True
    def testPutTimesout(self, eData="hello world!", noCheck=False, block=True):
        namespace = self._createInterface()
        try:
            iface = PyRQIface(namespace=namespace, ref="testPutTimesout-put", quiet=self.quiet, loggingModule=testLoggingModule)
            iface.put(eData, block=block, timeout=0.1)
                time.sleep(delay)
                try:
                    iface.put(data=eData, timeout=putTimeout)
                except Full, eData:
                    pass