Set ddrescue-tui EToC refresh rate in settings
This commit is contained in:
parent
28cea9697e
commit
c022d3f9c6
2 changed files with 3 additions and 2 deletions
|
|
@ -416,8 +416,8 @@ class RecoveryState():
|
|||
elif 'In Progress' not in self.status:
|
||||
# Don't update when EToC is hidden
|
||||
return
|
||||
if now.second % 5 != 0:
|
||||
# Limit updates to every 5 seconds
|
||||
if now.second % ETOC_REFRESH_RATE != 0:
|
||||
# Limit updates based on settings/ddrescue.py
|
||||
return
|
||||
|
||||
self.etoc = 'Unknown'
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ DDRESCUE_SETTINGS = {
|
|||
'--timeout': {'Enabled': True, 'Value': '5m', },
|
||||
'-vvvv': {'Enabled': True, 'Hidden': True, },
|
||||
}
|
||||
ETOC_REFRESH_RATE = 30 # in seconds
|
||||
REGEX_REMAINING_TIME = re.compile(
|
||||
r'remaining time:'
|
||||
r'\s*((?P<days>\d+)d)?'
|
||||
|
|
|
|||
Loading…
Reference in a new issue