diff --git a/carbontracker/tracker.py b/carbontracker/tracker.py index 1a87508..477d426 100644 --- a/carbontracker/tracker.py +++ b/carbontracker/tracker.py @@ -261,7 +261,7 @@ def epoch_start(self): except Exception as e: self._handle_error(e) - def epoch_end(self): + def epoch_end(self, manual_delete=False): if self.deleted: return @@ -276,7 +276,7 @@ def epoch_end(self): if self.stop_and_confirm: self._user_query() - if self.epoch_counter == self.monitor_epochs: + if self.epoch_counter == self.monitor_epochs and not manual_delete: self._delete() except Exception as e: self._handle_error(e)