Open accraze opened 8 years ago
Need to figure out how to unit test JobQueue.__iter__... see https://github.com/discogs/pymongo-job-queue/blob/master/pymjq/test.py#L50
JobQueue.__iter__
Due to the cursor staying open and waiting for new documents to enter the queue, this method never returns unless given a KeyboardInterrupt.
KeyboardInterrupt
A possible solution might be to use a timeout decorator: https://pypi.python.org/pypi/timeout-decorator
Need to figure out how to unit test
JobQueue.__iter__
... see https://github.com/discogs/pymongo-job-queue/blob/master/pymjq/test.py#L50Due to the cursor staying open and waiting for new documents to enter the queue, this method never returns unless given a
KeyboardInterrupt
.A possible solution might be to use a timeout decorator: https://pypi.python.org/pypi/timeout-decorator