diff --git a/README.md b/README.md index 8955d19..d4e1d3b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
Multi Server Chia Plot and Drive Management Solution
@@ -18,7 +18,7 @@ Multi Server Chia Plot and Drive Management Solution
Now fully supports pools and automatic removal of old plots on a one-by-one basis when replacing with new portable pool plots! Also includes a harvester-wide UUID search allowing you to locate any drive on any harvester by UUID and determine it's mountpoint!
-You must be running Chia Version 1.2.6 or higher for the reporting to work correctly!
+You must be running Chia Version 1.8.2 or higher for the reporting to work correctly!
Hopefully if you are reading this you know what Chia is and what a plot is. I am pretty new to Chia myself but I determined that I needed to come up with a way to manage my plots and hard drives that hold thse plots somewhat automatically since my job as a pilot keeps me gone a lot. I am not a programmer, so please, use this code with caution, test it yourself and provide feedback. This is a working version that is currently running and working for my setup which I will explain below. Hopefully it will be of some help to others, it is the least I can do to give back to the Chia community.
@@ -601,6 +601,9 @@ strategy above, it is super easy to add more drives.
### Changelog
+V0.99 2023-07-22
+ - Updated to support new logging format for reports (current through 1.8.2)
+
V0.98 2021-10-15
- Rewrote reporting utilizing Python Rich (https://github.com/willmcgugan/rich)
- Begin Python typing addition to functions (work in progress)
diff --git a/chianas/drive_manager.py b/chianas/drive_manager.py
index d9bc815..7a3cee2 100644
--- a/chianas/drive_manager.py
+++ b/chianas/drive_manager.py
@@ -3,7 +3,7 @@
# -*- coding: utf-8 -*-
__author__ = 'Richard J. Sears'
-VERSION = "0.98 (2021-10-15)"
+VERSION = "0.99 (2023-07-22)"
"""
NOTE NOTE NOTE NOTE NOTE NOTE NOTE
@@ -46,6 +46,10 @@
Updates
+ v0.99 2023-07-22
+ - Updated reporting to meet the new log file output of 1.8.2 to correctly read
+ the number of plots currently being farmed.
+
v0.98 2021-10-15
- Rewrote reporting utilizing Python Rich (https://github.com/willmcgugan/rich)
- Begin Python typing addition to functions (work in progress)
@@ -1631,29 +1635,10 @@ def send_new_plot_notification() -> None:
notify('New Plot Received', 'New Plot Received')
os.remove('new_plot_received')
-def check_plots_old() -> tuple: # new chia version changed the way they report things in the debug file!
- with open(chianas.chia_log_file, 'rb', 0) as f:
- m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
- i = m.rfind(b'Loaded')
- try:
- m.seek(i)
- except ValueError as e:
- return 0, 0
- line = m.readline()
- newline = line.decode("utf-8")
- x = newline.split()
- try:
- plots = x[4]
- TiB = float(x[8])
- except IndexError:
- plots = 0
- TiB = 0
- return plots, f'{TiB:.0f}'
-
-def check_plots() -> tuple:
+def check_plots() -> tuple: # new chia version changed the way they report things in the debug file! (works with 1.8.2)
with open(chianas.chia_log_file, 'rb', 0) as f:
m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
- i = m.rfind(b'Total')
+ i = m.rfind(b'plots:')
try:
m.seek(i)
except ValueError as e: