def _get_next_poke_interval(self, started_at, try_number):
    '\n        Using the similar logic which is used for exponential backoff retry delay for operators.\n        '
    if self.exponential_backoff:
        min_backoff = int((self.poke_interval * (2 ** (try_number - 2))))
        current_time = timezone.utcnow()
        run_hash = int(hashlib.sha1('{}#{}#{}#{}'.format(self.dag_id, self.task_id, started_at, try_number).encode('utf-8')).hexdigest(), 16)
        modded_hash = (min_backoff + (run_hash % min_backoff))
        delay_backoff_in_seconds = min(modded_hash, (timedelta.max.total_seconds() - 1))
        new_interval = min((self.timeout - int((current_time - started_at).total_seconds())), delay_backoff_in_seconds)
        self.log.info('new %s interval is %s', self.mode, new_interval)
        return new_interval
    else:
        return self.poke_interval
Using the similar logic which is used for exponential backoff retry delay for operators.
def _get_next_poke_interval(self, started_at, try_number):
    '\n        \n        '
    if self.exponential_backoff:
        min_backoff = int((self.poke_interval * (2 ** (try_number - 2))))
        current_time = timezone.utcnow()
        run_hash = int(hashlib.sha1('{}#{}#{}#{}'.format(self.dag_id, self.task_id, started_at, try_number).encode('utf-8')).hexdigest(), 16)
        modded_hash = (min_backoff + (run_hash % min_backoff))
        delay_backoff_in_seconds = min(modded_hash, (timedelta.max.total_seconds() - 1))
        new_interval = min((self.timeout - int((current_time - started_at).total_seconds())), delay_backoff_in_seconds)
        self.log.info('new %s interval is %s', self.mode, new_interval)
        return new_interval
    else:
        return self.poke_interval