<s> """<STR_LIT>""" <EOL> class SimpleTimestampPrioritizer ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , settings ) : <EOL> """<STR_LIT>""" <EOL> self . _priorities = settings . PRIORITIZER_NUM_PRIORITIES <EOL> self . _default_priority = settings . PRIORITIZER_DEFAULT_PRIORITY <EOL> self . _delta = settings . PRIORITIZER_CRAWL_DELTA <EOL> def calculate_priority ( self , curi ) : <EOL> """<STR_LIT>""" <EOL> if curi . current_priority and curi . status_code == <NUM_LIT> : <EOL> prio_level = min ( curi . current_priority + <NUM_LIT:1> , self . _priorities ) <EOL> else : <EOL> prio_level = <NUM_LIT:1> <EOL> prio = self . _delta * prio_level <EOL> return ( prio_level , prio ) </s>
