#NEWLINE# def get( self ) : #NEWLINE# #INDENT# 'Gets the list of ready items if any items are due' #NEWLINE# if ( self . _any_due ( ) and self . rate_limit . peek ( ) ) : #NEWLINE# #INDENT# with self . queue_lock : #NEWLINE# #INDENT# ready_items = list ( ) #NEWLINE# unready_items = deque ( ) #NEWLINE# for i in i . queue : #NEWLINE# #INDENT# if i . is_ready ( ) : #NEWLINE# #INDENT# ready_items . append ( i . item ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# unready_items . append ( i ) #NEWLINE# #UNINDENT# #UNINDENT# self . queue = unready_items #NEWLINE# self . rate_limit . ping ( ) #NEWLINE# return ready_items #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return list ( )