diff --git a/freqtrade/worker.py b/freqtrade/worker.py index 9b81764b6..a8bb931f8 100755 --- a/freqtrade/worker.py +++ b/freqtrade/worker.py @@ -35,7 +35,6 @@ class Worker: self._config = config self._init(False) - self.last_throttle_start_time: float = 0 self._heartbeat_msg: float = 0 # Tell systemd that we completed initialization phase @@ -135,10 +134,10 @@ class Worker: :param throttle_secs: throttling interation execution time limit in seconds :return: Any (result of execution of func) """ - self.last_throttle_start_time = time.time() + last_throttle_start_time = time.time() logger.debug("========================================") result = func(*args, **kwargs) - time_passed = time.time() - self.last_throttle_start_time + time_passed = time.time() - last_throttle_start_time sleep_duration = max(throttle_secs - time_passed, 0.0) logger.debug(f"Throttling with '{func.__name__}()': sleep for {sleep_duration:.2f} s, " f"last iteration took {time_passed:.2f} s.")