def _get_countdown_for_next_slice(self, spec):
    """Get countdown for next slice's task.

    When user sets processing rate, we set countdown to delay task execution.

    Args:
      spec: model.MapreduceSpec

    Returns:
      countdown in int.
    """
    countdown = 0
    if self._processing_limit(spec) != -1:
      countdown = max(
          int(parameters.config._SLICE_DURATION_SEC -
              (self._time() - self._start_time)), 0)
    return countdown
def _get_countdown_for_next_slice ( self , spec ) : countdown = 0 if self . _processing_limit ( spec ) != - 1 : countdown = max ( int ( parameters . config . _SLICE_DURATION_SEC - ( self . _time ( ) - self . _start_time ) ) , 0 ) return countdown
Get countdown for next slice's task.

    When user sets processing rate, we set countdown to delay task execution.

    Args:
      spec: model.MapreduceSpec

    Returns:
      countdown in int.