def _onOffset(self, dt, businesshours):
        # if self.normalize and not _is_normalized(dt):
        #     return False
        # Valid BH can be on the different BusinessDay during midnight
        # Distinguish by the time spent from previous opening time
        if self.n >= 0:
            op = self._prev_opening_time(dt)
        else:
            op = self._next_opening_time(dt)
        span = tslib.tot_seconds(dt - op)
        if span <= businesshours:
            return True
        else:
            return False
Leases a task from a queue.
dataset/ETHPy150Open pydata/pandas/pandas/tseries/offsets.py/BusinessHourMixin._onOffset--crossover with--dataset/ETHPy150Open bslatkin/dpxdt/dpxdt/server/work_queue_handlers.py/handle_lease