def ices_get_next(): file_path = vote_queue.get_next() if (not file_path) : file_path = scratch_queue.get_next() return file_path
def ices_get_next(): while (True): file_path = vote_queue.get_next() if (not file_path): file_path = scratch_queue.get_next() logger.info('File to play: %s' % file_path) pipe = open(ICES_PIPE, 'w') pipe.write('1') pipe.close() if (file_path is not None): return file_path time.sleep(5)
def ices_get_next(): while (True) : file_path = vote_queue.get_next() if (not file_path) : file_path = scratch_queue.get_next() logger.info('File to play: %s' % file_path) pipe = open(ICES_PIPE, 'w') pipe.write('1') pipe.close() if (file_path is not None) : return file_path time.sleep(5)