doloop.bump's lock_for kwarg can now take a 2-tuple of the form (min_lock_for, max_lock_for), in which case each bumped ID will be randomly assigned a lock_for N such that min_lock_for <= N < max_lock_for.
This is useful because it allows IDs to be fetched randomly w.r.t. the order in which they were inserted. There is a performance benefit to bumping a set of IDs in a single call to doloop.bump instead of one call per ID (1 vs many mysql update statements issued).
doloop.bump's lock_for kwarg can now take a 2-tuple of the form (min_lock_for, max_lock_for), in which case each bumped ID will be randomly assigned a lock_for N such that min_lock_for <= N < max_lock_for.
This is useful because it allows IDs to be fetched randomly w.r.t. the order in which they were inserted. There is a performance benefit to bumping a set of IDs in a single call to doloop.bump instead of one call per ID (1 vs many mysql update statements issued).