Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create disk spaces log path #929

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Regression in v0.5.2 where plotting processes that lack log files caused a traceback.
([#926](https://github.com/ericaltendorf/plotman/pull/926))
- Create the directory for the new disk spaces log file.
([#929](https://github.com/ericaltendorf/plotman/pull/929))
### Added

## [0.5.2] - 2021-09-12
Expand Down
8 changes: 1 addition & 7 deletions src/plotman/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def setup(self) -> None:
os.makedirs(self.plots, exist_ok=True)
os.makedirs(self.transfers, exist_ok=True)
os.makedirs(os.path.dirname(self.application), exist_ok=True)
os.makedirs(os.path.dirname(self.disk_spaces), exist_ok=True)

def create_plot_log_path(self, time: pendulum.DateTime) -> str:
return self._create_log_path(
Expand All @@ -343,13 +344,6 @@ def create_transfer_log_path(self, time: pendulum.DateTime) -> str:
group="transfer",
)

def create_tdisk_space_log_path(self, time: pendulum.DateTime) -> str:
return self._create_log_path(
time=time,
directory=self.disk_spaces,
group="disk_space",
)

def _create_log_path(
self, time: pendulum.DateTime, directory: str, group: str
) -> str:
Expand Down
19 changes: 11 additions & 8 deletions src/plotman/resources/plotman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
# https://github.com/ericaltendorf/plotman/wiki/Configuration#versions
version: [2]

logging:
# One directory in which to store all plot job logs (the STDOUT/
# STDERR of all plot jobs). In order to monitor progress, plotman
# reads these logs on a regular basis, so using a fast drive is
# recommended.
plots: /home/chia/chia/logs
# transfers:
# application:
#logging:
# # One directory in which to store all plot job logs (the STDOUT/
# # STDERR of all plot jobs). In order to monitor progress, plotman
# # reads these logs on a regular basis, so using a fast drive is
# # recommended.
# # For Linux, these paths default to a directory under ~/.local/share/plotman/
# plots: <directory>
# transfers: <directory>
# # For Linux, these paths default to a file at ~/.cache/plotman/log/
# application: <file>
# disk_spaces: <file>

# Options for display and rendering
user_interface:
Expand Down