Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wait forever in outbound_async_server_test.py? #106

Open
pubyun opened this issue Dec 1, 2013 · 0 comments
Open

wait forever in outbound_async_server_test.py? #106

pubyun opened this issue Dec 1, 2013 · 0 comments

Comments

@pubyun
Copy link
Contributor

pubyun commented Dec 1, 2013

here is source code from outbound_async_server_test:

        # play file
        self.playback("/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-hello.wav", terminators="*")
        # wait until playback is done
        self.log.info("Waiting end of playback ...")
        event = self._action_queue.get()
        # log playback execute response
        self.log.info("Playback done (%s)" % str(event.get_header('Application-Response')))
        # finally hangup
        self.hangup()

if we hangup the sip phone when playing ivr-hello.wav, ""Playback done" will not show in the log file. will outbound_async_server_test wait forever?

document of gevent:

http://www.gevent.org/gevent.queue.html

gevent.queue.Queue()

get(block=True, timeout=None)
Remove and return an item from the queue.

If optional args block is true and timeout is None (the default), block if necessary until an item is available. If timeout is a positive number, it blocks at most timeout seconds and raises the Empty exception if no item was available within that time. Otherwise (block is false), return an item if one is immediately available, else raise the Empty exception (timeout is ignored in that case).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant